Bring a large pot of salted water to a rolling boil. Add the pasta and cook until just al dente, about 8 minutes. Drain, reserving about 1/2 cup of pasta water, and set aside.
Meanwhile, pat the shrimp dry and season lightly with salt and pepper. Heat a wide skillet over medium-high heat and add a tablespoon of olive oil. Once shimmering, add the shrimp and cook for 2-3 minutes per side until pink and slightly caramelized. Remove from the pan and set aside.
In the same skillet, add a touch more olive oil if needed, then add the minced garlic. Sauté gently for about 30 seconds until fragrant, being careful not to burn it.
Return the cooked shrimp to the skillet, then add the drained pasta. Pour in the basil pesto and toss everything together over medium heat, adding a splash of reserved pasta water if needed to loosen the sauce and help it coat the pasta evenly.
Squeeze the juice of half the lemon over the pasta and sprinkle with lemon zest. Add red pepper flakes for a subtle heat, and toss again to combine all flavors.
Cook for another minute, allowing the flavors to meld. Taste and adjust seasoning with more lemon juice or salt if needed. Serve immediately, garnished with extra basil or lemon zest if desired.