Hilchot Tefilah 11:9-10 (Entering a synagogue for non-mitzvah purposes)
11:02 am
A person should only enter a synagogue in order to do a mitzvah. But if someone needs to enter a synagogue in order to do something mundane, is there a method by which he can do it?