Toast the pistachios in a dry frying pan over a medium-low heat, shaking the pan occasionally until they are golden. This should take 5-7 mins.
Blitz the pistachios in a food processor, then add the basil and lemon juice. Pulse again and slowly add the olive oil through the funnel in the lid. You will end up with a dark green sauce with flecks of pistachio – how smooth you make it is up to you. Season to taste with sea salt and freshly ground black pepper, then transfer to a bowl and set aside.
Heat the 2 tablespoons of olive oil in a large saucepan over a medium heat, add the courgettes and fry until golden. You will need to turn them so that they cook evenly. Cover the pan with a lid and cook for a further 2 mins – this will create steam inside the pan and will soften the courgettes.
Add the halved tomatoes and cook on a low heat for 5 mins, until the tomatoes have softened. Keep warm while you cook the orecchiette.
Bring a large pan of water to the boil, then season well with salt. Drop in the pasta and cook for 2-3 minutes so it retains some bite. Drain, reserving a jug of pasta cooking water, and transfer the pasta to the pan of courgettes and tomatoes.
Now add the pesto and a generous splash of the pasta cooking water. Toss everything together well and check the seasoning before serving into warmed bowls. Finish each plate with finely grated pecorino or parmesan.
