Depends on the item, really. For things like potions, scrolls, and alchemical goods, I don't necessarily have item shops, but there are alchemists, sages, and other people who make good money selling minor consumables. It's good money and you're almost guarenteed continued business. But then, I'm really loose with power components, because I want to encourage an abundance of low level items like that. Having the party wizard make a dozen Mage Armor potions feels far less McMagic to me than relegating the cleric to "would you like fries with that CLW?" status. At least the potions/scrolls require resource expendature.
When the cost of the item reaches a couple thousand or so, though, it gets to the point where your creator is definately going to lose some XP unless some massively rare and hard to get goodies are used, and I can't think of any caster who'd part with his life force on the off chance that someone would pay him good gold to do that. So when you get to +1 stuff, you can probably find someone with the knowhow who'll make it for you, but you'll have to comission it and wait. And as a house rule, if you don't cover his XP hit with appropriate components, you'll have to pay a little more than book price to cover his expenses. So it's not too hard, you'll just have to get a little involved in the story.
More powerful magic items, you'll either have to find someone really powerful to comission it from (and keep in mind that these people tend to be busy with their own affairs and tend not to need crude gold or piddling magic items; you'll have to do something major for these people), find someone who already has one and appropriate it by fair means or foul, or else find one that was put away someplace hard to get to either as tribute or for safekeeping. The typical adventurer ways, really.
And as a side note, I've played in "we don't let people buy/sell magic items, you'll have to loot the corpses" style, and I always wondered how if magic items were so rare, all the enemies you came across seemed to have some that were just a little less powerful than yours. And when the PC's had closets full of +1 swords, I'd assume that NPC's would have the same, so why not sell some of those useless things off for a little more working gold?