Add spinach, basil (if using), garlic, nuts, lemon, salt, and pepper to a food processor. Pulse until finely chopped.
Add Parmesan and pulse again.
With the processor running, drizzle in olive oil until the pesto is smooth and creamy.
Adjust to taste and thin with water if needed.
Store in the fridge for up to 5 days, or freeze in small portions for future use!