Perhaps the best answer is that there ARE NO MAGIC SHOPS. Someone posted, in an economics-of-3E thread, that in his campaign those who wanted to purchase magic items had to work through a "broker", who would track down the items. Because everything went through a middleman, the chance of theft was driven down.
But I'm uncomfortable with doing this all the time. It would seem to me that there have to be wizards out there churning out potions and scrolls in something other than complete secrecy. Ditto clerics.
I guess I don't quite get the problem. If there is so much difficulty in protecting magic shops, which there certainly would be, then the shops logically must either (a) spend lots of cash setting up magical defenses, or (b) go out of business from continual theft. In a high-magic setting like Forgotten Realms, I can imagine that every magic shop has a 7th-10th level wizard on the security staff. (Prices would be driven up accordingly, of course.

Of course, they could go into the magic shop business themselves-but then they face all of the problems that the magic shop owners that couldn't stay in business faced. A third-level wizard might decide that churning out potions of bull's strength might be an easier living than adventuring; but after a few late-night visits from representatives of the Thieves' Guild, he might decide that it's not worth the trouble. Stay secret, do limited business through trusted intermediaries, and you might make a good living. Put out a sign saying 'Potions for Sale, Cheap!', though, is like painting a bulls-eye on your back ...
Last edited: