Put the avocado flesh into a blender. Reserve a few basil leaves for garnish and put the rest into the blender with the garlic, nuts, lemon juice and olive oil. Blend for about 20 seconds until smooth, adding a little water if you prefer a thinner consistency. Season to taste.
Bring a large saucepan of lightly salted water to the boil and cook the gnocchi according to pack instructions. Drain well, return to the saucepan and add the pesto sauce and tomatoes. Heat, stirring gently, for 1-2 minutes.
Share between 2 warmed plates or bowls and sprinkle with extra black pepper and the reserved basil leaves. Serve with the Parmesan shavings.