Paint or stain your molding beforehand, using a paintbrush, to give your work ample time to dry before installation.
Cut away any excess subfloor poking up from the expansion space between the newly installed floors and the baseboard molding, using a utility knife.
Run a stud finder along at the bottom edge of the wall to identify the studs. Lightly mark the top edges of your baseboards wherever studs exist, using a pencil; make sure your markings are clearly visible after you put the shoe molding against the wall.
Cut the shoe molding to the length and width of your room, using a miter saw. Miter-cut the ends of the molding at 45 degrees. Cut away at the front of the molding for inside corners and from the back of the molding for outside corners.
Dry-fit the shoe molding against the wall. Check your corners so they fit together properly; make adjustments to the angles if necessary.
Nail into the center of your shoe moldings to affix them directly to the wall studs, using a nail gun. Find the studs by looking for the marks you made on your baseboards to indicate a stud's location.
Fill the tops of your nail holes with caulk. Touch up where necessary with paint or stain.