Hey just thought I would throw in my two cents on this one. Hope these help or atleast get your mind moving in the direction you want to see. Mostly I use method #1.
Mundane precautions:
1) Limit stock on hand.
Nothing says don't rob me quite like knowing there isn't much to steal. You could rule that most items are special order. You must come in and place an order, then show up at the proper time to pick up items. (Gee we just don't keep +3 swords around these parts, but we could get one if you're willing to wait 3 weeks)
Minor items are on hand, but in limited quanties.
Pro: The shop isn't a target for theives.
Con: harder to control the list of items availble as the GM.
2) Limit access to items while PC's are in store.
The magic items are stored in the back in some secure fashion. One item is brought out at a time, so there is limited stock on hand to grab and dash with. This prevents most stun and grab jobs and most charm and walk jobs, but leaves that back store room as a target for the invisible thief.
Magical Mundane Precautions.
3) Glyphs of warding
This works well in combination with #2. Go ahead and sneak into my backroom.
4) Wizard Lock to cabinets
This is pretty straight forward. Items are in cabinets and they are locked. Won't stop parties but would foil the local no good thief.
5) Cabinets that store items are actually command word activated extra dimensional spaces.
Same strategy as #4, but taking it up a notch. High levels could also require that the item be bonded to a particular hand print or retinal pattern (if you want to throw in some cyber punk elements into your magic shop)
6) Hallow combined with an Invisibility Purge.
This would have to be renewed every year and it costs a lot of money, so only highly profitable businesses would bother, but it is still out there as a way to expose the invisible thief.
7) Forbiddance around the counter and backroom
This will stop most thieves from coming anywhere near the items.
8) Almost forgot alarm stones.
Need to bend the rules just a bit suggestions.
9) Permanent antimagic shells around storage area.
This prevents teleporting, invisiblity and all sorts of high level sneak stuff. Combine this with an item like an alarm stone that is always going off and an item that creates a force cube. When the antimagic shell is up those items don't work, but when it is dispelled, boom instant thief trap. You might throw in some sort of area dimension anchor etc. If your really cruel throw in a mirror of life trapping or perhaps an item that creates a circle of death.
10) Use some of the portals ideas from FR.
The local shop is just an outlet for some centralized magic creating outfit. Each local store has a portal to some central location where magic items are created and super protected. Not only would knocking off the local shop be a waste of time, but would piss off a much larger organization. Each morning the shop would be passed minor items (scrolls, potions, +1 swords) so they have these on hand without needing to use the portal too much.
11) Sensormatic Teleport tags

All magic items have a spell cast on them such that when the command word is spoken, they return to the item creator or the shop where the item was for sale. Removing this spell is part of the post sale treatment of the item.
Social Inhabitioins.
12) Guards
Pretty straight forward. You can customize by inserting constructs, gargoyles, or by giving them some of the magic items.
(Gems of true seeing, rings of invisibility, etc)
13) Mafia/Powerful Mage guild runs shop.
You can steal from the shop, sure you can. But do you want these guys on your trail?
14) Strong thieves guild in town
Chances are the items your PC's are trying to buy didn't come from some hero that died of natural causes. Heck, they might not even be dead yet. The Thieves Guild ain't going to be happy when the items, they are fencing, errr, selling on consignment, get stolen.