The Sages forbade buying and selling on Shabbat, lest one come to write. Even selling a mitzvah item is forbidden, but selling aliyot, and a collection for a mitzvah, are permitted. Maran the Shulchan Aruch writes that tzedakah for youths to learn Torah is preferable to the mitzvah of a synagogue. As the Chafetz Chaim, zt"l, compared a store open on Shabbat to a second tap on a barrel. From the booklet of Rabbi David Shalom Naki, shlit"a.