Whether you're using it to keep frosting looking fresh in any weather or for its pure white coloring, shortening is a common base for the dessert topping. If you'd rather not use it, or you don't have any in the house, you can use other fats. The substitutes result in a slightly different taste and texture than plain shortening, but still create a delicious frosting.
Shortening is typically made from hydrogenated vegetable oil. This creates a stable fat that lends a flaky texture to pastries or increases their shelf life. Shortening is typically used in frosting because it's stable. It holds up well to both high and low temperatures, so you can keep it in the refrigerator or serve it outside at a summer party.
Unsalted butter as a substitute for shortening adds a rich flavor. Use it to replace shortening in a 1:1 ratio in a recipe. For optimal results, use one-half shortening and one-half butter to make the frosting. The shortening will stabilize the frosting while the butter will add flavor and texture. Do not use salted butter because it will alter the taste of the frosting.
Margarine can also replace shortening in frosting. Made from whipped vegetable oil and typically an unsaturated fat, margarine has a buttery flavor and whipped butter texture that remains the same whether at room temperature or chilled. It can be substituted for shortening in a 1:1 ratio. Like butter, margarine does not hold up well to heat. Replace only one-half of the shortening with margarine in a frosting recipe if it will be exposed to heat.
When adding dyes or flavorings to frosting made with something other than shortening, keep in mind they typically have their own flavor and color. Butter has a natural dairy taste and margarine imitates that flavor. Both have a slight to dark yellow tint, which can affect any colors you add to the frosting. If you're using shortening and want a buttery taste, add a butter flavoring to the frosting.