A shop is a place in which the character may trade his gold for new items, or sell his old items for gold. Each game has a different implementation for the shops; they can be menu based as in Angband or spatially located inside the game, as in NetHack.
Not all roguelikes implement shops, and the rules of trading change from one to another, including charisma bonuses and stealing.
Shops are found randomly and question whether to spend all wealth in recently found store becomes a tactical decision because two levels deeper there may be another with better stuff for sale.
Notable games using this approach: NetHack, ADOM, Crawl
Players wishing to make use of their money need to visit a town. This creates gameplay stages where player will return to town to assess his loot, identify new items and upgrade gear.
Notable games using this approach: Larn, Angband, DiabloRL, Moria, Guild
This encourages packratism because hauling many items to sell becomes profitable. When hunger or similar mechanism is too weak or not present it invites to collect and bring contents of whole dungeon to exchange for cash. Offered prices most often are half original value or less.
Notable games using this approach: Angband, NetHack, ADOM
Merchants will refuse to buy any item. This is easier to balance.
Notable games using this approach: Crawl
Buying an item will provide allow player to identify same items it on sight. Cheap (or cursed) items are likely to get purchased because this gives information about hazards almost for free.
Notable games using this approach: Crawl (except antique stores), Angband
Purchase is made while knowing only base item type. Bought stuff may be really good, simply mundane, mediocre or even worthless.
Notable games using this approach: Crawl (antique stores), ZapM (need to understand clerkbot)
Get to know your stuff yourself!
Notable games using this approach: NetHack