Measure the distance to the closest window edge and the farthest window edge from the end of the closest piece of foam insulation you've installed. If this is your first piece, measure from a corner or other fixed object. Record the measurements on a piece of paper.
Measure the height from the floor to the bottom and top edges of the window. Record the measurements on a piece of paper.
Transfer the measurements to your foam panel, sketching out the cutout on the panel with a pencil and a straightedge.
Score the lines of the cutout with a sharp utility knife, using the straightedge as a guide to ensure that you're cutting straight. Snap off the excess foam with your hands. Position the cutout around the window opening to make sure that it fits properly.
Lay the foam insulation panel face down on a flat surface. Apply construction adhesive to the back side of the panel and place it on the wall, lining up the opening with the window. Hold the panel in place until the adhesive sets.
Apply a bead of caulk around the edge of the window and the panel. This will prevent air from leaking around the edges of the insulation.