Q. Can you give a shape on Shabbos to the food you are eating, by cutting it with a knife or by selectively biting and eating from it, such as cutting the challah in a triangle or creating other shapes?
Can you decorate on Shabbos a cake or a dessert by pouring or spraying on it foam like cream?

A. Mishna Berura (500: 15-17) rules that it is prohibited to cut a matza or a piece of meat (even) on Yom Tov in a way that it would create a specific shape like a tzion. Chaye Adam (39: 1) also forbids joining together pieces of food to fashion a figure, as he transgresses the melacha of boneh or building.
One should also not cast forms into butter or cheese to be served in a particular image, nor shape the traditional egg and onion dish salad. (Shemiras Shabbos Kehilchoso (11: 11-13).
Horav Shlomo Miller’s Shlit”a opinion is that it is only prohibited when done for the purpose of beautifying and embellishing the food product by creating a specific figure, lettering or design, that transmits a distinct message or conveys a particular idea. Just cutting food, even if it is done to become more presentable and attractive, is permitted. By the same token, the Rov also permits icing a cake or a dessert with whipped cream from a dispenser or an aerosol can, If done without creating letters or figures.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a