The Merchant is the only friendly NPC you can trade with. His random spawns are specific to rooms rather than levels, so it is not guaranteed there will be a merchant on every level; conversely, it is possible for two or more merchants to spawn within a single level. He will offer players various weapons, armors and devices in exchange for one of the FIDS resources. The number of items he offers, as well as which items are available, is random. The Merchant will also purchase any extra items you do not need or want (albeit at a greatly reduced price). Selling uneeded items can be useful if you're short on a resource, especially if the Merchant's currency is Dust.
The Merchant will remain in the room he spawned in until you either exit the level, lose, or he is killed by mobs. He can spawn in a room with Minor Modules, making it possible to protect him if you're so inclined to do so. The player can research the Shop major module, which will teleport the merchant (even already discovered ones) into it. The shop may then be operated like major resource module, gaining dust/door opened. The amount of dust gained is 1/10 Wit, rounded up. If you delete the shop after building it, the merchant will remain in the new location. There is a certain type of mob that will prioritise the merchant as soon as they spawn.