Add the remaining butter to the pan, then add the onion, garlic and cayenne pepper and cook for a few minutes until the onion is soft; stir often. Add the cooked mushrooms and cream, and season with salt and pepper.
Once the pasta is ready, add it to the pan along with 1 cup of the starchy water it was cooking in; cook until the pasta is al dente, stirring frequently.
Remove the pan from the heat and add the parmigiano, spinach, basil and lemon juice and zest (if using) and stir, allowing the spinach to wilt; if more liquid is needed, add more of the starchy water. Taste and add more season and or lemon juice if desired, then serve seasoned with parmigiano.