To make the pesto, combine the basil, pinenuts and garlic in a blender or food processor. Process until smooth. With the motor running, slowly pour in the oil. Add the parmesan and process until smooth.
Heat the oil in a small pan. Add the garlic and cook over medium heat for 1 minute. Add the cream and 3 tablesspoons of the pesto and bring to the boil. Be careful as it will boil over easily. Reduce the heat to low and simmer for 3 minutes.
Meanwhile, cook the gnocchi according to the packet instructions. Drain and place the gnocchi in a large bowl. Pour on the sauce and toss thoroughly. Season with salt and pepper and stir through the lemon juice just before serving.
Transfer to a serving bowl. Garnish with basil and serve with lemon wedges.