Interacting with NPCs
To interact with an NPC, you simply walk up to them and right click (or "use").
If the NPC has conversation, the game chat will display the conversation. Use the W and S keys or mouse scroll wheel to select a chat option, and then press the space bar to select it.
If the NPC has a shop and no conversation, the shop GUI will automatically open. Left click items to buy, right click to specify an amount to buy (if enabled on the item). Clicking the icon in the bottom right hand side of the shop GUI will change to SELL mode. Click it again to enter Trade mode. (NOTE: not all shops have 3 modes, some may only have one)
If the NPC has a shop and a conversation, you can open the shop by selecting the appropriate chat response.