Begin boiling water for spaghetti. Cook according to package instructions as you sauté the vegetables.
Heat 1 tbsp olive oil in a skillet. Add half of the minced garlic to the skillet. Cook for a minute, then add the squash. Sauté for 3 minutes or so until the squash has begun to soften. Add the basil, salt and pepper to taste, and the fresh lemon juice. Put the heat on very low, and cover to keep warm while the pasta finishes cooking.
Drain the spaghetti and toss with the vegetables and a tablespoon of olive oil. Add the cheese, and optional pesto if using it, then stir to combine. Cover pan to keep warm as you cook the shrimp.
Heat the remaining table of olive oil in another skillet on medium high heat. Add the shrimp to the skillet, cook for two minutes, then stir in the remaining garlic. Cook the shrimp, stirring frequently to cook both sides. Cook the shrimp for about 4 to 5 minutes total until they are cooked through, with the flesh turning white and the tail red.
Plate a serving of the spaghetti, topped with a serving of the shrimp. Enjoy with a crisp Italian wine.