Bring a pot of water to a boil. Cook the spaghetti according to the package instructions. Drain and set aside, reserving 3 tablespoons of the pasta water.
Heat a skillet over medium heat and add the olive oil. Add the garlic and sauté for 30 seconds, then add the shrimp, chili flakes, and salt. Cook the shrimp until both sides turn white, then add the spaghetti and reserved pasta water to the skillet. Stir to combine well.
Add the parsley to the skillet and stir to distribute it evenly. Turn off the heat and add the Parmesan cheese. Dish out and serve immediately.