Cook the spaghetti or linguine according to package instructions in a large pot of salted boiling water until al dente. Drain and set aside, reserving 1/2 cup of pasta water.
In a large skillet over medium heat, melt the butter. Add the minced garlic and red pepper flakes, cooking for about 1 minute until fragrant but not browned.
Add the shrimp to the skillet, seasoning with salt and pepper. Cook for 2-3 minutes on each side until the shrimp are pink and opaque.
Stir in the lemon juice and zest, followed by the cooked pasta. Toss everything together, adding reserved pasta water a little at a time until the desired consistency is reached.
Remove from heat and stir in the chopped parsley. Adjust seasoning if necessary.
Serve immediately, garnished with grated Parmesan cheese if desired.