The prayer was taught to the Muslims by the Prophet himself...
The prayer was taught to the Muslims by the Prophet himself, who used to say: Pray as you see me praying. And in this process he used the same wordings which his ummah was expected to say. For example, Ibn 'Abbas reports the wordings of tashahhud as recited by the Prophet (s.a.w.a.) that he used to say, inter alia, "Peace be on you, O Prophet! and mercy of Allah and His blessings." Mark that he said "on you" (not on me) and addressed himself saying, 'O Prophet!
(Sahih Muslim, vol.2 p, 15; Imam ash-Safi'i, Kitab al-Umm, vol. 1, p, 140, Beirut, 1403/1983). The companion, Ka'b ibn 'Ujrah, reports about the Prophet (s.a.w.a) that he used to recite in the prayer: 'O Allah!
send Your mercy to Muhammad and the progeny of Muhammad as You sent mercy to Ibrahim and the progeny of Ibrahim, and send Your blessings to Muhammad and the progeny of Muhammad as You sent blessings to Ibrahim and the progeny of Ibrahim; surely You are Praiseworthy and Glorious." (Kitab al-Umm. vol. 1, p. 140). Thus you see that the salawat and tahiyyat were being recited by the Holy Prophet himself.
It is not unlike surah Al-Fatihah, where Allah^raises Himself and declares, "Thee alone do we worship and from Thee alone do we seek help." All this was done to teach the Muslims how to talk to Allah. Q. 65: THE BASIS OF OUR PRAYER'S METHOD: Why, based on Qur'an and or hadith, do we as Shia pray as we do? A: It is not possible to write here reason of every action of prayer in which we differ from our Sunni brothers.
In short, you may rest assured that our prayers are 100% based on the Qur'an and the ahadith of the 14 Ma'sums (a.s.). For example, our 6th Imam, Ja'far as Sadiq (a.s.) once prayed 2 rak'ah prayer in order to show one of his companions, Hammad ibn 'Isa, how to pray. Hammad later narrated the whole episode in full detail. But even that tradition is too lohg to be translated in this short letter. However, our prayer fits that description perfectly. Q.
66: HOW TO STAND IN JAMA 'AT PRAYER Are we to stand in prayer shoulder to shoulder and toe to toe or just shoulder to shoulder? Please explain. A: It is emphasized that we should stand in a straight line without leaving any gap between two persons. Although there shall be no trouble even if there is a small gap, let us say, about a foot and a half. But standing together without any gap is ideal. When you stand at the side of another man, naturally you will stand shoulder to shoulder.