Substituting fats in baked goods can be tricky, cookies probably the most so.
Shortening has no water and produces the least spread as a cookie bakes.
Butter is a bit less than 20 percent water and produces more spread than shortening but less than margarine.
Margarine can be up to 50 percent water produces the most spread in a baked cookie.
So moving from margarine to butter, the cookie will spread less and need a longer baking time. The chew will also be affected but with teh change in baking time, that's hard to predict.
You can probably figure out adaptations such as a change in temperature, time and technique. By technique, I mean that you would probably benefit from pressing the cookie flatter before baking to account for the reduced spread. BUt this will affect time as well. How much to press remains an exercise for the baker. Spacing might be affected somewhat too.