(1) How to buy and sell food
A: Use food cash registers (WA)
The cash registers give not only the look and feel of a burger shop but also the function that your sims can actually buy food from an NPC that the registers spawn. You can also change her/his clothes using Master Controller as shown in the picture. There are various cash registers available (including consignment cash register from AMB) while, of course, only food register enables sims to buy good. Well, you can still pretend they are selling food (or anything) using any cash register.
B: Use professional bars (LN)
In order to buy and sell food using the bar item, you MUST set the lot type as a bar or club or lounge. The bar items also spawn NPC. The advantage of using this method is that you can have haute cuisine as well as group food and drinks.
C: Use mods
There is a mod that let you shop from inventory. There’s even custom food by ATS so you can have a bakery or such. I’m afraid I can’t explain more about these mods since I haven’t used them in person.
(2) How to work in the custom diner
You need custom rabbit holes to make community lots into “enterable” rabbit holes. Place the rug or door anywhere you want, and have your sims work there as culinary career. Sims will be just disappeared near the rug/door while they work. Note: custom rabbit hole for diner is only available for now, meaning that your sims can’t eat outside.