Bismillahi Al-Rahmani Al-Rahim
Praying In Churches Or Synagogues
What is the ruling of a prayer prayed in a church or a synagogue?
Ibn Muflih reports in Al-Adab al-shar`iyah that it is permissible for Muslims to enter churches and synagogues, and that it is permissible to pray in them. There is some difference of opinion over whether or not it is always offensive, never offensive or offensive only if there are figurines. One of several reasons cited for it being offensive to do is because praying in a church or synagogue is an annoyance to the people who worship there. Offensive or not, the prayer is still valid. (See Ibn Muflih. Al-Adab al-shar`iyah. ed. Shu`ayb Arna'ut. 3rd edition. 4:77-78.)
And Allah knows best.
wa al-salamu `alaykum