Put the item(s) you want to buy/sell, per transaction, in a chest.
Put a sign near the chest.
Put [Buy] or [Sell] on the first line.
Fill out the second and third line. It can be whatever you want, such as a description of what the shop contains!
The fourth line is the amount you’re buying/selling the item for.
Link the chest and sign by punching the chest with Redstone Dust, then the sign!
Tips
Left-click on an existing shop sign for a detailed view of what the shop contains.
The [Buy] or [Sell] indicator refers to the action of another player. For example, if you want to make a sign for someone to buy watermelons, you would put [Buy] at the top of the sign. If you want to have players sell their watermelons to you, you would put [Sell] at the top of the sign.
When you link the chest and sign, only have the exact number of item(s) you want to sell or buy for each transaction (such as a music disc, 5 cod, or a full set of diamond armor).
If [Buy] is blue, the shop is in-stock. If it is red, it is out-of-stock. If you’ve just restocked the shop and it’s still red, left-click on the sign to update it.
Once sign shops have been created, they cannot be edited. You must remove the shop by breaking the sign and recreate it.
One chest can have more than one shop. If you want to do that, ensure when you link the chest to each shop sign, the chest only contains the item(s) for that shop. After the signs are linked to the chest, then the different items can be put into the chest.
To remove a sign shop, simply break the sign.
Barrels can be used for sign shops as well.
[buy] and [sell] are valid casing for the first line as well.
When interacting with a sign shop buying or selling redstone, you will need to hit the sign with another item or an empty slot.