Bring a large pot of salted water to a boil. Cook pasta until just al dente. Reserve 1/2 cup water and drain.
Season the shrimp with 1/2 teaspoon salt, black pepper, and red pepper flakes.
Warm olive oil and butter in a large skillet over medium-high heat.
Sear shrimp 1–2 minutes per side until pink and just cooked. Transfer to a plate.
Lower heat to medium. Briefly sauté garlic until fragrant, 30 seconds. Stir in tomatoes and cook until they soften, 2–3 minutes.
Stir in pesto and a splash of the reserved pasta water to loosen into a glossy sauce.
Add drained pasta and shrimp. Toss to coat, adding more pasta water as needed for a silky coating.
Finish with lemon juice, Parmesan, and remaining salt. Toss, taste, and adjust seasoning. Garnish with basil.