First off, it's worth considering what role money serves in games, because I think the problem isn't shops, it's money (gold) and what it's used for.
- Getting new stuff. Obviously, money is a universal agreed-upon method of exchanging goods and serves, so a money reward is theoretically better for the player since it lets players pick what they want, rather than get stuck with the reward they were given.
- Sense of forward progress. Money is a measure of upward mobility in the game universe - you start out with nothing and end up with everything. Having lots of cash on hand feels great to the player, especially if there is risk of losing it or a need to spend it.
- Provides a way of mediating game mechanics which otherwise are difficult to control. Resurrections in D&D CRPGs usually cost money, for example, because the designers want to limit abuse of suicidal strategies (or at least, that's why they should). You can try using XP or some other currency/points/etc. for these kinds of game functions, but money is the most logical.
- Story reasons. Many games have quests centered around amassing a lot of money. This is actually a really good way of designing a scenario - it lets the player effectively choose how to reach that goal, whether it's by solving other goals, by stealing, etc. Can feel a little artificial and can be done poorly (like Dragon Age 2's first act or even Baldur's Gate 2) but as a means to an end it's totally acceptable.
Obviously this question is most relevant to the first point, getting new stuff. This is how money is primarily used in a majority of games, and the other uses mentioned are generally secondary. If a game doesn't give you enough to spend your money on in shops, and there aren't any alternate uses for it, you have a game economy that begins to look very broken and silly, also reducing verisimilitude.
When we think about the role money really serves in most RPGs, reflecting the player's progress through the game, it becomes clear that there needs to be an alternate solution to the problem. While "balance the game better" sounds easy, in reality it's a very fine tightrope - money needs to be easy enough to obtain so that the player never gets stuck, but it has to be hard enough to get and valuable enough that it needs to be saved up. Since it depends so much on the type of player (do they rush the game or search every house? do they sell all the loot or just toss it away?), there is basically no perfect solution.
What I think works best is to give gold a strong secondary (or even primary) focus other than shops, so that at least when one use breaks down, the other can still theoretically be relevant. Treating money as an alternate form of XP makes the most sense given how much it resembles XP in the first place. The Gothic series, Risen, and Elder Scrolls all to varying degrees do this, and I think Gothic's solution of typing player skill progress to money is probably the best and most realistic solution. In Gothic, at least before the player gets to god-level, the decision to either level up or buy a suit of armor is a very, very real one, and it gives the player a lot to consider. While I wouldn't say Gothic also maintains the absolute best stores (usually crafting etc. works better), stores are still handy because they provide the player with a method of filling holes in their character build (such as buying health potions vs. brewing them).
There are potentially other ways of giving money a use that are worth considering. Long-term quest goals like the ones mentioned above are a good solution, but most games only feature one or two of these and don't go far enough. If this content is too optional, it also starts to become viewed as a money sink, and when you start to include player houses you end up with what is effectively a game balancing mechanism that relies entirely on the player's vanity and completionism - not really a good thing in my mind.
Of course, if you want to talk about the realism of shops - that's just game world design. I don't actually have a problem with say, Diablo's merchants having tons of powerful artifacts, because the game makes it clear that the things practically grow on trees anyway. On the other end of the spectrum, Fallout's shops make sense - smugglers have drugs and extremely powerful, rare weapons, regular merchants have basic supplies, specialty merchants have books and other things, etc. When you have a game world where a level 1 trader has epic-level artifacts stuffed in his pack ready to be sold for millions of gold (Baldur's Gate and Icewind Dale, in some cases), well, I'm of a mind to simply blame the person who didn't think things through. Really, verisimilitude outside of the shop's role in the game mechanics is a minor thing and only laziness or idiocy will mess that up.