'Using money for a shul for a different mitzvah'