Boil spaghetti in salted water until soft and drain.
Heat olive oil in a pan and lightly sauté garlic.
Add cooked spaghetti and mix with basil pesto.
Stir well until pasta is evenly coated with sauce.
Add cherry tomatoes and season with salt and pepper.
Cook for 2 minutes to combine flavors.
Serve hot with Parmesan cheese on top.