I am making buttercream icing, but the powdered sugar does not dissolve with the butter and shortening. The icing is grainy. How can I prevent this?
This can have different reasons.
How long did you mix it? The transition between grainy and creamy can come late and suddenly, but it should happen eventually.
Was the butter cold? I have been getting the best results with room-temperature butter.
Did you sieve the powdered sugar? If not, that may be the problem. Or did it perhaps get wet at some point and crystallize again?
If all these are NOT the problem, try adding some milk, or if you plan to use it anyway, vanilla essence, in small drops, while stirring.
I hope one of these will help :).
Just like when making fudge, Mother used to fold this by hand in a metal bowl on her lap. Honestly I think it's the slight impartation of body temperature which induces the sugar granules (microgranules) to break down a bit, you know, just this side of syrup. The smallest taste every once in awhile marks your progress. (It was really nice to be reminded of this.)
Follow all of Layna's answer, and also sift the sugar, and keep everything at room temperature. If you use milk, only a half teaspoon. Remember you can't rush perfection. The trick with all cooking baking and even life is patience. Grainy is a texture, not a flavor.
Start with room temperature butter. Beat it for 2 or 3 minutes. Put the splash cover over the mixer bowl. Start the mixer and then ... THIS IS THE KEY ... add the sieved icing sugar (powdered sugar) TABLESPOON BY TABLESPOON beating well between each addition. I searched the internet trying to find out how to lose the grainy texture & the above 'be very patient' method worked!
This was an issue I had that drove me crazy for such a long time! We're talking throwing-spatulas-across-the-kitchen-frustrated. The magic fix is to use ONLY PURE CANE SUGAR. I know it sounds too easy, but after reading labels on the sugar I was buying (store brand because, hello, it's cheaper and what's the difference, really?) I noticed that the ingredients only say "sugar". Which likely means that it comes from beets, rather than sugar cane. Yes, it's a thing. A very common thing, and after delving more into it it turns out that beet sugar also browns differently from cane sugar. Unless the ingredients label specifies "cane sugar" it's likely not made with sugar cane. I don't know the science behind it, but it has been a game changer for me. This, coupled with making sure the butter is (cool) room temp before creaming it and adding the vanilla very last thing have improved my buttercream more than I ever could have imagined.
Graininess is a matter of perspective. Unfortunately, the American buttercream you're going for is inherently on the grainier side. There are ways to adulterate it so that it's smoother, but in doing so, you'll get away from a pure American buttercream.
Contrary to what one commenter said, butter/powdered sugar as a frosting is purely an American invention, popularized by Wilton decorating. French buttercream is made by dissolving sugar in an egg yolk mixture over a Bain Marie and then beating room temperature butter into the cooled mixture. Swiss and Italian meringue buttercreams are similar in that they require dissolving the sugar crystals completely, leading to a perfectly smooth texture.
The other European option is German buttercream, which requires a pastry cream which you then beat butter into. The difference between German and french styles is the inclusion of cooked starch in the pastry cream.
The last semi(?) American version which is probably easiest (and does not include eggs) is ermine buttercream... I generally see this referred to in older recipes as trailer park frosting, so I wonder if it's German buttercream made without eggs because of poverty. This requires cooking a pudding with water or milk, sugar, and starch, which also dissolves the sugar completely, giving a perfectly smooth texture. However due to the increased moisture content, and relatively low sugar,you should refrigerate this frosting if you plan to keep it more than a few days.
If you seriously want to avoid cooking, you can experiment with using more shortening to replace part of the butter, and sugar syrup to replace part of the powdered sugar. However I don't have as much experience with those ingredients. Good luck!