You can make a template yourself at home or buy one from a specialty store. Depending on the recipe, it can have a different shape. A template with long, oblong shapes can be used to make éclairs; short oblong shapes can be used to make cat tongue cookies; while round shapes can be used for macarons.
A template is used over a sheet of parchment paper. The batter is applied to the spaces and smoothed with a spatula. The template can go into the oven if the batter is runny, or it can be removed if the batter is firm enough.