Cookie and bar recipes are generally more forgiving than cakes, but all baking is based on chemistry. If you try to make substitutions that aren't noted in your recipe, or you don't use enough of one ingredient, here's what could happen:
Some recipes don't call for a greased pan or sheet because there's enough fat in the crust or batter to keep the cookies or bars from sticking to the pan. If you grease the cookie sheet when the recipe calls for an ungreased sheet, your cookies could spread too much and turn out thin or flat.
If the recipe calls for a greased pan or sheet, use shortening. Here's how:
Apply a little bit of shortening to a paper towel or piece of waxed paper. (You can also use a pastry brush to spread softened shortening.)
Spread the shortening in a thin coating over the bottom and sides of the pan.
Coat the crevices where the sides meet the bottom of the pan.
Line your pan or cookie sheet with foil, parchment paper, or a nonstick baking mat (writing side up) as an alternative to greasing. Foil or parchment paper will enable you to lift the whole batch of bars from the pan at once when it's time to cut them.
To make a foil liner:
Carefully follow the cooling directions in the recipe. Bars often cool in the pan on a wire rack. Some cookies need to cool for a few minutes on the cookie sheet before you move them with a spatula to a cooling rack. With enough cooling time, both cookies and bars will firm up nicely.
If you greased your pan, you can cut your cooled bars into squares or diamonds. Then use a thin metal spatula to loosen bars around the edges of the pan. Use a spatula to gently lift the bars from the pan.
If you used a foil liner, use the 1-inch overhang to lift the bars -- foil and all -- from the pan; cut the bars into squares or diamonds. Gently lift each bar from the foil, pulling down on the foil as necessary to remove it from the bottom of the bars.
Once you remove the cookies, let the cookie sheet cool and use a spatula to remove any crumbs. Or rinse the cooled cookie sheet with cool water and dry thoroughly. Once the cookie sheet is cool, clean, and dry, you can use it for another batch.