Summary of Parasha & Halacha Shiur on P. Va’Era, by Rabbi Ariel Ovadia
The Pasuk says, that when the Barad (hailstones) hit Mitzrayim, פרעה called Moshe and begged him to remove this harsh plague. Moshe answered that he will pray to Hashem when he leaves the city. Rashi explains that Moshe couldn’t pray in the city because it was full of idols.
The Terumat HaDeshen discusses a traveler who is faced with a choice either to pray Minha on the road where there are many distractions, or to pull over at an inn which is full of idols. He cites this Midrash and rules that should preferably not pray in a place with idolatry unless there are too many distractions on the road. Maran and the Rama cite this L’Halacha. (Many Poskim are lenient when it is just symbols and not idols.)
If it is an actual house of idol-worship, one can not only not pray in it, one may not enter it whatsoever (Avoda Zara 12). Therefore, the Poskim forbid entering a church to look at its art and architecture. Hacham Ovadia Hedaya and others also forbid entering a church to vote.
The Poskim debate whether a mosque is also a Bet Avoda Zara. The Ran is strict and the Rambam is lenient. Based on the Rambam, Hacham Ovadia permitted praying in Ma’arat HaMachpela. The Poskim also forbid entering reform and conservative temples, unless there is a social hall that serves for general functions.
The Poskim debate whether one can convert a house that used to serve as an idol house into a Bet Kenesset. The Magen Avraham (O.H. 154) permits, while the Mishna Berura and others are strict. The Igrot Moshe is lenient if a large expense was incurred or if the building was altered significantly.