A simple way to create some Shops or ItemSwitch with players, in VANILLA !
It use a Dispenser, so, just put items you want to give in. To chose the input-item, put one in the first hopper, to the left place. The ratio is : 1 item VS 1 item (dispenser).
Don't forget sometimes you will have to make the output chest empty and refund the dispenser !
Good Luck & Have Redstone !