Cook the spaghetti or linguine according to package instructions in a large pot of salted boiling water until al dente. Reserve 1/2 cup of pasta water, then drain the pasta and set aside.
In a large skillet, heat 2 tablespoons of olive oil over medium heat. Add the minced garlic and red pepper flakes, sautéing for about 1 minute until fragrant.
Add the shrimp to the skillet and season with salt and pepper. Cook for 2-3 minutes on each side until the shrimp turn pink and opaque. Remove the shrimp from the skillet and set aside.
In the same skillet, add the remaining 2 tablespoons of olive oil and the halved cherry tomatoes. Cook for about 3-4 minutes until the tomatoes start to soften.
Pour in the white wine (or chicken broth) and bring to a simmer, scraping up any bits from the bottom of the skillet. Let it cook for about 2 minutes.
Return the shrimp to the skillet along with the cooked pasta. Toss everything together, adding reserved pasta water a little at a time until the desired consistency is reached.
Stir in the chopped parsley and lemon juice. Adjust seasoning with salt and pepper as needed.
Serve immediately, topped with grated Parmesan cheese.