Bring a large pot of water to boil.add little salt to this water.Cook gnocchi according to the package instruction.Drain all the water and keep gnocchi aside in a plate.
Take a pan .Add olive oil to it .If using butter ,add butter to it.
Add garlic to it .Saute it on low /medium flame ,till the aroma of garlic makes the oil garlicky.
Add pesto to it .Saute it for 30 second and add red pepper flakes, basil and heavy cream /vegan dairy to it.
Stir it till the sauce thickens.
Add cooked gnocchi to it .Mix very little salt(according to your taste)and pepper to it.
Mix it properly and cook it for 1 minute.
If its thick for your liking add little pasta water to it .
Garnish with fresh basil leaves and serve.