The majority of early jurists considered the secondary...
The majority of early jurists considered the secondary ruling applicable in situations of necessity arising from obligatory taqiyya (dissimulation), which refers to fear-based taqiyya.
[8] Some jurists have also deemed participation in the opponents’ congregation permissible when taqiyya (dissimulation) is practiced for the purpose of courtesy, attracting the goodwill of Sunnis toward Shias, creating an atmosphere of good social interaction among Muslims, reconciling the hearts of opponents toward Shias and their school of thought, and reducing or eliminating hostility toward Shias.
The Manner of Participating in the Sunni Congregational Prayer According to the majority of jurists, a Shia follower joins the Sunni congregational prayer from the beginning together with the opponents, and in the physical actions of prayer such as bowing (ruku) and prostration (sujud), follows the prayer leader externally. However, he must recite the call to prayer (adhan) and the iqamah himself. Moreover, the recitation does not drop from him, and he is required to perform it himself.
[9] The author of Jawahir explicitly states that the obligation of recitation during participation in the Sunni congregational prayer from the perspective of taqiyya has been affirmed by Imami scholars, and that no contrary opinion has been found on this matter.
[10] In this case, performing the recitation, considering the conditions of taqiyya, has levels: in situations of intense fear, it may be reduced to recitation within one’s mind; and if the imam precedes the follower in recitation, the follower may suffice with whatever he manages to recite, or if he finishes early, he may engage in dhikr. He may also recite silently in audible prayers (salawat jahriyah) instead of reciting aloud.
[11] The Fatwa of Ayatollah Sistani Ayatollah Sistani says the following regarding participation in the Sunni congregational prayer: “It is permissible for a Shia Imami to perform prayer behind them (the Sunnis), but the follower, if able, must quietly recite for himself; and if he cannot, then he should recite it in his heart. If taqiyya requires, he may also perform takattuf (placing the hands together).
Likewise, if in the place one is standing there is nothing upon which prostration is valid, then it is permissible to prostrate on a carpet or similar material; and if something valid such as earth or matting is available, then he must prostrate on that” .