Not all fats are alike, especially in baking. Cakes and cookies will turn out differently depending on what fat you use. And no, you can't use them interchangeably without changing the results. Count on having to adjust the recipe. How do you decide what to you? Well, it all comes down to personal preference.
Butter is butter. It's about 80% fat and made by churning cream until it's smooth and thick. But shortening is a different story. Shortening is 100% animal or vegetable fat that is solid at room temperature (you probably know it better as Crisco). While opened butter lasts about three weeks in the refrigerator, shortening doesn't really go bad and doesn't need refrigeration.
Because shortening doesn't go bad, your baked goods will have a longer shelf life. It will also make your cookies softer and your cakes fluffier. However, shortening doesn't provide the delicious flavor of butter. Actually, it doesn't have any flavor at all. You can use butter-flavored Crisco, which we are ashamed to admit we used in our younger days. But it's just fake flavoring added to shortening. There are enough preservatives in our food without us adding more.
Depending on what type of cookie or cake you want will determine what type of fat you use in your recipe. You can even have the best of both worlds by using half of each in your recipes. Happy Baking!