Belief Follows Behavior
When converting to a new faith, it is often the behavior of a person that changes first, then the belief. A new member is attracted by love bombing and other factors, they pick up on social cues and model the behavior. Then comes the conviction in belief. This is true of many cults, even in the Mormon Church where so many are born into it, mimic the behavior their entire lives, and only gain a testimony as a teen, or on their missions.
A new member, not wanting to appear out of place, quickly catches on the the routine of a typical sacrament meeting. Wear a dress or a white shirt and tie, close your eyes and bow your head during prayer, remember to say "Amen" at the end, sit quietly, take the sacrament quietly, sing along to the hymns (remember to stand up!), raise your hand to the square to sustain new callings, shake hands with the new people you meet, and call people "Brother Y" and "Sister X". People are reading their scriptures. People listen to the speakers intently. Noisy children are removed and five minutes later come back mysteriously quiet.
These simple behaviors are repeated first, along with patterns seen in other meetings and outside of the Sunday block. As time goes on, more difficult behaviors are added, like fasting, Home Teaching, serving a mission, and attending the temple.
You don't have to believe to practice these things, as evidenced in the Church's many talks and lessons on how to gain your own testimony. "Do not live on borrowed light", means to stop relying on the collective social testimony and get one of your own. Indeed many children born in the Church start with behaviors not beliefs. Some people are even converted without a testimony or even a professed belief. They're told they will gain more understanding in time.
And how does the Church tell us to gain a testimony? First we must act. Follow the commandments first. "If any man will do his will, he shall know of the doctrine, whether it be of God, or whether I speak of myself." John 7:17 (Scripture Mastery). We are to experiment upon the word to see if these things (the words of God, the commandments) are not true (Alma 32). Immerse yourself in service, callings, Church activities.
Or you can bear your testimony until you gain one. (More on this under the public commitment section.) Doubting young men (and sometimes women) are often told they will gain their testimonies on missions.
Once you begin behaving in a certain manner, you are committing yourself, in a visible way, to the belief. This is an application of cognitive dissonance. If you are walking the walk, and talking the talk, yet don't yet believe it is true, your mind perceives a discomfort. In most cases, members and investigators want to believe at this point anyway, so the mind will take the path of least resistance. They will begin a collection of cognitions to support their actions, while rejecting cognitions that conflict. The member will come to believe on a deep and profound level that the basis of their actions (the doctrines of the Church) are true.