Bring a large pot of salted water to a boil. Add the spaghetti and cook according to package instructions until al dente. Reserve ½ cup of pasta water, then drain the pasta and set aside.
In a large skillet, heat the olive oil over medium heat. Add the minced garlic and red pepper flakes, cooking for about 1 minute until fragrant, but not browned.
Add the cherry tomatoes and a pinch of salt. Cook for 4-5 minutes, stirring occasionally, until the tomatoes are softened and juicy.
Stir in the baby spinach and cook for another 2 minutes, until wilted.
Add the drained pasta to the skillet along with the reserved pasta water, lemon zest, and lemon juice. Toss everything together gently until well combined.
Remove the skillet from heat and add dollops of ricotta cheese over the pasta. Sprinkle with grated Parmesan cheese, and stir gently to mix. Season with additional salt and black pepper to taste.
Serve warm, garnished with fresh basil leaves.
Notes
Serve in shallow bowls with extra basil and Parmesan for an elegant touch.