I don’t like magic shops. They sell stuff that’s too high-value so they would be constantly robbed, so to exist they need super-duper security. Players inevitably want to rob the magic shop, and either they get stomped by security and slain (because come on, will the shopkeeper seriously let them live to try again or tell their friends how you always get a free bite at the apple) or they win through and get a long ton of magic items. Typically, it’s worth it to destroy the magic shop as a service if you get all his inventory – and clever ways to prevent theft begin to look more and more like adversarial DMing and lead to recrimination and disappointment.
You could have individual sellers and buyers. Typically they would be other adventurers or higher-level established NPCs like the high priest of a temple or a wizard in his tower. Stealing from that NPC would be virtually identical to just attacking a random high level NPC to get loot, which is what happens in a lot of dungeons. The concentration of loot is lower than a magic shop, and the loot-to-difficulty ratio is normal. The PCs will also lose access to important services if they screw over or slay the NPC.
For a campaign I had magic brokers. This would be a guy who has contacts instead of inventory. If you want an item, you go to him and he will keep an eye out. If you want to sell an item, he will either have a buyer waiting or will put the word out that he has a seller. In any case, the trading parties never meet. The broker takes the payment, pays the seller for his item, brings the item to the buyer. This helps the magic shop robbery issue because you can only ever steal the proceeds from one deal, not a whole inventory. If you get the broker’s books, you have a list of magic item locations, but you need to go through the adventuring effort to actually break through separate sets of security, reducing the magic item windfall.
The second problem with magic shops is just the feel of having players ask for specific items. It unduly rewards system mastery for players who know which items to ask for, or which items tend to be good deals, and destroys the mystery of finding magic items as loot.
So, my current attempt is the Fairy Market.
Every PC (not henchmen etc.) in the party who is level 3 or higher gets a 1 in 6 chance to spot the Fairy Market at the start of each game session. One time I described it as the PC taking a night stroll after the tavern and seeing a strangely different alley in the village, paved with hexagonal mossy stones and illuminated with hanging lanterns, far-off glows and sounds of laughter and delicious scents through a faint mist. The player can run off and gather the whole party, but there isn’t time to go around town making deals before entering the Fairy Market.
The market has five or six vendors who are people with features that make them look like an animal or plant: the owl guy has thick glasses, bushy eyebrows, and says WHO words a lot. Each vendor sells a bunch of normal stuff, and one magic item (or a few potions or arrows).
For my market, I decided that (1) there would never be cursed items, (2) the vendors would sell at book price, (3) the vendors would buy PC magic items at book price, and (4) if the PCs steal from the market they can never return – that part of the game is just gone. I didn’t tell them any of this, but they’re assuming 2-4 without my assistance.
I could see someone balking at the 1:1 exchange rate. I did that because it doesn’t offer a huge array of items, so it’s not an “exchange whatever loot the DM says I found for the exact thing I want” but instead “exchange my undesirable loot for something that I think might be better for me”.
One time the market was accessed via a large oven, with the passage beyond leading to a steam tunnel-like area with insect and slug themed vendors and “bad” items like poison and necromantic magic.
Once I did a rundown, faded casino with a 3d6 slot machine for money, a claw machine with magic item prizes, and a potion vending machine. The claw machine had a low success chance, but a couple of players managed to get something. One player sipped a Potion of Elasticity he found earlier to reach into the claw machine through the prize chute. I described it as a suspiciously long, winding chute – he couldn’t see the prizes because he was crouched beside the machine, so he still had to roll but with a much better chance, and the other players got to choose which thing he would get because they were directing him. He got 1 try per turn, and the potion lasted a secretly-rolled 2d6 turns. He pushed his luck and kept going until the end, and I made him roll a DEX check to get his rapidly-shrinking arm out before it got stuck in the machine. The players were suspicious that the ruse might be discovered despite the fairy attendant snoozing nearby, so they plugged in enough gold into the claw machine to cover one attempt per nabbed prize – which I decided was enough to keep the market from going away.
The other thing I always do is talk about the food. The first fairy market, based on the early scenes in Spirited Away, required a save vs. spell for all who went in to avoid spending 250 GP on delicious morsels. The casino had a free buffet that wasn’t great, but they didn’t turn it down. The steam tunnels featured coal braziers of streetmeats and soups of garlic and onions.
I use the Fairy Market to insert the opportunity to get magic items that aren’t in the adventure I’m running. For example, if someone decided to play a Druid but I didn’t plan for that and there’s a paucity of Druid items, I can have the Fairy Market sell one every time. It also gives them the ability to sell their unwanted magic items (and I try to give magic items as loot value instead of so much money) without the associated problem of figuring out logistics for the buyer in town.
Because the Fairy Market has a predetermined inventory, and different vendors, there’s no player asking for certain magic items and no benefit for that system mastery. The possible extra loot is limited to the current inventory of the market. And there’s no recrimination at DM machinations to guard the magic shop – if the PCs steal, they’ll just get away with it and feel that the market has faded away behind them forever.
I prepare the market for the next game session, and if nobody rolls a 1 in 6 (has happened once) I save that for use next time. I don’t roll items randomly, I try to make it stuff the players can afford and might be interested in.
Pretty sure this isn’t the best way to handle it, but it’s a fun experiment and the players like it.