Cut shrimp crosswise into thirds. Sprinkle shrimp with ½ teaspoon salt; set aside.
Combine reserved shrimp shells; oil; smashed garlic; and anchovies, if using, in large Dutch oven and cook over medium heat until shells are spotty brown, 5 to 7 minutes.
Stir in wine and cook until liquid is nearly evaporated, about 2 minutes.
Add water and remaining 1 teaspoon salt, increase heat to high, and bring to boil.
Reduce heat to medium-low, cover, and simmer for 5 minutes.
Using spider skimmer or slotted spoon, remove shells from shrimp stock and transfer to bowl. (Some garlic cloves may be inadvertently removed at this point; this is OK.) Pour any stock that has accumulated in bottom of bowl back into pot. Discard shells.
Stir pasta into stock and bring to simmer. Cover; reduce heat to medium-low; and simmer, stirring occasionally, until pasta is al dente, 10 to 14 minutes (some liquid will remain in bottom of pot when pasta is al dente).
Stir in shrimp and cook, uncovered, until opaque, about 2 minutes, stirring often.
Off heat, stir in parsley, capers, lemon zest and juice, pepper flakes, and minced garlic. Stir vigorously until sauce is thickened, about 1 minute. Serve with Parmesan.
