Bring a large pot of salted water to a rolling boil.
Add the spaghetti and cook until al dente according to package directions, reserving 1 cup of pasta water before draining.
Drain the spaghetti and set aside.
In a blender or food processor, combine spinach, basil leaves, garlic, Parmesan cheese, walnuts, olive oil, cream cheese, and milk.
Blend until completely smooth and creamy, scraping down the sides as needed.
Season the green sauce with salt and freshly ground black pepper to taste.
Return the drained spaghetti to the pot or place in a large serving bowl.
Pour the green sauce over the hot spaghetti and toss to coat, adding reserved pasta water by the tablespoon if the sauce is too thick.
Serve immediately, garnished with extra Parmesan cheese and fresh basil leaves if desired.