Summarize:

Set the bottom of the window in first and lift the rest of the window up into place. To secure the window, butt the exterior window frame up against the opening blind stops. Do this from the interior wall side, and take care not to push the window clear out the other side of the wall. Make sure that the sashes are still locked when you set the window in place. The replacement window may not sit flat in the window hole as once you’ve set it in place. To determine if it’s level, set a level on the top of the lower sash and look to see if the indicator bubble floats to the center of the tube. Even if the window looks level, it may be off-kilter to a very slight degree. If you don’t have a level, purchase one at a local hardware store. The tool resembles a metal bar that’s roughly 18 inches (46 cm) long. Shims are nearly flat pieces of wood that slightly raise the level of one side of the window. If the installed window doesn’t cleanly open and close or if it’s not level, place 1 shim at a time beneath the low side to raise it up. To secure the frame, also place shims at the middle of the frame and at the middle of the top and bottom sashes. Once the shims are in place and the window is square and opens and closes smoothly, snap off the shim stems. This will prevent the frame from becoming warped when you tighten the screws through the window and into the frame. Place shims directly behind the jamb where each screw will be inserted. When you insert the screws, they’ll pass directly through the shims. If the ends of the shims stick out once you’ve screwed the window into place, snap them off.
Set the replacement window into the frame opening. Use a level tool to ensure that the window is level. Insert shims beneath the window until it sits flat and opens smoothly. Install shims behind screw holes.