Put your money in the machine, choose whichever food you want, and the meal ticket will come out.
ーPut your money in the machine, choose whichever food you want, and the meal ticket will come out. Then give the meal ticket to the restaurant staff.
「お金を機械に入れて、食べたい料理を選んだら食券が出てきます。そしたら、その食券を店の人に渡して」
to put one's money in ... で「お金を…に入れる」
meal ticket で「食券」
to come out で「出てくる」
この場合、when や if を使う必要はありませんよ。使わないのが自然です。
ご参考まで!