In a food processor, add in the basil leaves, garlic cloves, olive oil, and parmesan cheese. Blend until well combined and the basil is fully incorporated. Add in a little more oil and/or parmesan cheese if you want it creamier.
Once the pesto is made, or if you are simply using jarred pesto, add to a large blender with the pasta water, heavy cream, and a tablespoon or two of extra parmesan cheese. Close the blender and blend until very smooth, then set aside.
For the Pasta
Bring a large pot of water to a boil then add in the pasta of choice. Cook pasta until al dente, and reserve some of the pasta water for the pesto sauce. Drain the pasta, then set it aside.
In the same pot that the pasta cooked, add in a tablespoon of butter and sauté the garlic and shallot in the butter on a medium heat for 1-2 minutes or until fragrant.
Once the garlic and shallot are softened, throw in the remaining butter, add in the baby spinach, reduce to a medium-low heat, and cook the spinach until wilted and buttery.
Pour the cooked pasta directly into the pot with the spinach, then pour in the pesto sauce and combine pasta with the sauce and the spinach until fully coated.
Garnish with fresh parmesan and basil leaves.
Notes
When stirring in the pesto sauce, be sure to use enough to coat the pasta and keep it creamy. You might think you are adding in too much of the sauce, but trust me, you want it creamy and you want the pasta to be coated well and not dry out.