Wash the basil leaves and dry them thoroughly.
Blend basil, garlic, pine nuts, parmesan, and olive oil into a smooth paste.
Preheat the oven to 200°C and bake pricked potatoes for 60 to 90 minutes.
Cool potatoes slightly, slice in half, and scoop the flesh into a bowl.
Mash the potato flesh until completely smooth.
Crack the egg into a separate small bowl and remove any shell fragments.
Mix mashed potato, egg, flour, cheese, and spices into a smooth dough.
Roll dough into long sausages and cut into 2cm pieces.
Press each piece with a fork to create a ridged pattern.
Boil gnocchi in salted water for 30 seconds until they rise to the surface.
Drain gnocchi with a slotted spoon and toss with pesto to serve.