How does substituting Butter for Margarine/Shortening affect the Recipe
Here are the players:


butter (~80% fat, salt varies)
margarine (~80% fat, added salt)
vegetable oil spread (less than 80% fat, salt varies)
shortening (100% fat, no salt)


I only list it that way, because some people think a vegetable oil spread = margarine. It is not. 

If you substitute an oil spread for butter, you could have problems.

My experience is that butter and true margarine can be substituted freely without negative results. Though, most people believe butter has a better flavor profile.

Salt content could also be a factor. Salt varies in different butter/margarine brands. I'm not sensitive to salt levels, but you might be.