Shallots, not onions, are essential for Thai cuisine. They are used for making Thai curry pastes, salads, and certain condiments and pickles. They are also served raw on the side with certain dishes such as khao soi.
This sweet smelling leaf is used for flavouring different sweet snacks/desserts. It is also used in the well known dish Kai ho bai toei, deep fried chicken wrapped in pandanus leaves, as well as to stuff the belly of barbecued fish