Toast the nuts: place the nuts in a small, dry skillet. Toast over low heat, shaking the pan often, until fragrant and toasted, about 4 minutes for pine nuts and 6 to 8 minutes for walnuts. BE PATIENT. As soon as you crank up the heat, nuts love to burn.
Place the pine nuts and garlic in the bowl of a food processor fitted with a steel blade. Blend for 10 long pulses.
Add the basil, spinach, salt, and pepper.
With the processor running, slowly pour in the olive oil through the feed tube. Puree until smooth, about 45 seconds to 1 minute. Scrape down the side of the food processor bowl as needed.
Add the Parmesan and puree until blended, about 30 seconds more, stopping to scrape down the bowl as needed. Add additional oil if you'd like the pesto thinner. Use right away or store for later use (see tip below).
TO STORE: Air is the enemy of pesto! To store, place pesto in the refrigerator in as small a container as possible, and press a piece of plastic over the top so air doesn’t touch the pesto. Instead of plastic, you can also drizzle a thin layer of olive oil on top. It will stay fresh for up to 5 days.
TO FREEZE: Freeze pesto in an airtight freezer-safe storage container for up to 3 months. Let thaw overnight in the refrigerator before using.