Cook the spaghetti or linguine according to package instructions until al dente. Drain and set aside, reserving 1/2 cup of pasta water.
In a large skillet, heat the olive oil over medium heat. Add the minced garlic and red pepper flakes (if using) and sauté 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, or until the shrimp turn pink and opaque.
Stir in the lemon juice and zest, then add the cooked pasta to the skillet. Toss everything together, adding reserved pasta water as needed to create a light sauce.
Remove from heat and stir in the grated Parmesan cheese until melted and well combined. Adjust seasoning if necessary.
Garnish with fresh parsley before serving.