I pray in a Shul that does not directly face Jerusalem – I would say it is off by approximately 15 degrees. I know of another Shul that is probably off by some 30 degrees. Where does one face in such a situation.
You should try angle your body to face Jerusalem, even if this means not facing the front of the shul. It might be easier to do this next to a wall than in the middle of the shul. In priciple, the entire congregation should do the same. This is all the more true for the 30 degree error, which is very significant.
Sources: Mishnah Berurah 94:9-10; see alsoShoneh Halachos, 94.