The Mechaber (152:1) brings the halacha that it is prohibited to demolish a Bais Haknesses before a new one is built. The Rema adds that this prohibition applies to any part of the Bais Haknesses unless it is being done in order to rebuild it or for renovations. It is similar to the prohibition of smashing the stones of the Bais Hamikdash. According to many poskim this is a Torah prohibition even in regard to a Bais Haknesses. Any amount of destruction is included in this prohibition.
The Sharei Teshuva brings from the Shailos Yaavetz that this prohibition applies even to the side of the wall that is on the outside. One may not even bang in a nail on the outside wall if it is not for the need of the Bais Haknesses. This includes attaching electrical and telephone wires to the outside that are not benefitting the Bais Haknesses. The only heter would be is if the Bais Haknesses is built on condition that it may be used for other things. Still many poskim hold that for this, the condition would have to be spoken out, and one can’t rely on the reasoning that the conditions work automatically because of Bais Din. The Shevet Halevi says that according to everyone the outside of the wall is only prohibited M’Derabanan.
However if someone’s house shares the same wall as the Bais Haknesses the Shailos Yaavetz says it is permissible to use the other side of the wall that is in the house. Some poskim hold that nevertheless one should refrain from using that room for degrading activities. It should definitely not be used as a bathroom.
The Mishna Berura brings a machlokes if one can make a hole in the wall of the Bais Haknesses to attach a piece of wood to be used as a shtender. According to the Taz it is prohibited, however according the Elya Rabah it is permitted. The Mor Uktzia says that since the shtender can be made to stand on its own, it should not be screwed into the wall.
When I was a child growing up in Cleveland our family davened in Shomer Shabbos. Our Rav was Rabbi Yisroel Grumer zt”l, Av Bais Din of Cleveland. I remember that there was a shtender attached to the mizrach wall near his seat, which he used when he davened Shimone Esrei. He always paskened from the Mishna Berurah and it seems that the Mishna Berurah paskens this way, not like the opinion of the Taz.1
Prepared by R’ Avrohom Yehoshua Ziskind
1Sources: Mishnah Berurah, Piskei Teshuvos, Dirshu