A magic item "shop" is just another treasure horde. You provide it with items, or roll on a table, just like you'd treat the treasure of a Kobold Dragon Cult.
To get the items, you'd have to plunder the shop (like you did the Kobolds) or pay the price in gold (like you could have the Kobolds) or whatever. Any and all items I add to the campaign world and the PCs are aware of, I expect the campaign to handle them using.
There is no (well, no absolutes; see below) magic mart with a huge stock of a variety of magic items to pick from.
A source of consumables, like, potions can exist; if I need it to exist and it didn't already, I might add in a quest to get the ingredients for the NPC to produce a bunch of healing potions. Then, in another continent, where mad wizard forged abominations spew forth from towers and dinosaur-riding herders rule the plains, healing potions are "easy" to come by (but watch out for side effects!).
Scrolls are the typical means most spellcasters use to cast spells (rather than the PC-like memorization and slots), to the extent that most wizard spellbooks are just books full of spell scrolls. Few spellcasters sell them; there are guilds where apprentices (very slowly) labor away and produce low level scrolls for higher tier members of the guild, but they aren't sold on the public market, but rather provided for dues and services to the guild. So gaining access to a supply of scrolls is either a black market thing, or a social status thing.
But paying a guild member for a few "excess" scrolls could probably happen. They don't want to get caught, and their supply is not arbitrary; so it won't be a regular thing.
The equivalent with priests runs into the problem that their scrolls and scroll-equivalents are literally invested with divine power. So selling them for gold to be used by some random person is sacrilegious. Selling the spellcasting service for a worthy purpose for a donation to the church is a different thing entirely.
Campaign phase changes, where what was previously impossible or difficult to find becomes easy, occur. For example, imagine finding the armory of an ancient high-magic kingdom, with literally 1000s of +1 enchanted weapons and armor. There is a civilization that arms its troops with sparkguns (magic weapons that fire lighting; these have advantage to hit on targets in medium or heavy metal armor; misfires are a shocking experience).
Getting a +1 weapon becomes impossible, then it becomes trivial.
As gold cannot be freely converted to/from magic items, this causes no direct game-balance economic issue; you cannot convert 1000 +1 swords into a staff of the magi. There is no market for 1000 swords at a "decent" price, even though you might have spent 1000 gp to buy your +1 sword only a few months ago and counted yourself lucky at the great bargain.
OTOH, those 1000 swords used to arm an army of soldiers could swing the result of a war.