Cook the spaghetti or linguine according to package instructions in a large pot of salted boiling water until al dente. Reserve ½ cup of pasta water, then drain the pasta and set aside.
In a large skillet over medium heat, melt the butter. Add the minced garlic and red pepper flakes (if using), and sauté for about 1 minute until fragrant.
Add the shrimp to the skillet, season with salt and pepper, and cook for 2-3 minutes on each side until they turn pink and opaque.
Stir in the lemon zest and lemon juice, 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 chopped parsley. Serve immediately, topped with grated Parmesan cheese.