Blend the flour and eggs together in a food processor until the mixture resembles breadcrumbs. Turn the mixture out onto a lightly floured work surface and squash the crumbs into a ball of dough. Knead the dough for 4-5 minutes, or until smooth and elastic. Wrap the dough in cling film and chill in the fridge for 20 minutes.
For the pesto, grind the basil, pine nuts, parmesan and garlic to a rough paste in a pestle and mortar. Gradually pour in both the oils, stirring as you add them. Season, to taste, with salt and freshly ground black pepper. Set aside, covered, until needed.
To prepare the pasta, dust the rollers of a pasta machine with flour. Cut the chilled pasta into three pieces and flatten each out to a thickness of about 1cm/Â½in.
Set the pasta machine to its widest setting and feed one piece of dough through the machine, turning the handle with one hand and collecting the rolled dough as it comes through the machine with the other.
Change the setting on the pasta machine to the next thickest setting, dust the rollers with a little flour, then feed the same pasta sheet through the machine again, as before. Repeat this process three or four more times, flouring the machine and changing the setting down each time, until you reach the penultimate setting. As your pasta sheet becomes longer, cut it in half so that the rolling process is more manageable.
Repeat the rolling process with the remaining two pieces of dough. Once all of the dough has been rolled out, you should have six long sheets of pasta.
To make the tortellini, place one long sheet of the pasta onto the work surface with the longest side facing you. Place two large basil leaves in the bottom half of the pasta, then fold the top half over the basil leaves. Set the pasta machine to its finest setting and pass the sheet through the machine again. Repeat the process with the remaining pasta sheets and large basil leaves.
Cut the pasta sheets into 9cm/4in discs using a cookie cutter. Place one small basil leaf into the centre of each, and top with one teaspoonful of ricotta.
One by one, brush the edges of each pasta disc with a little water. Bring the edges of each disc together to form a semi-circular shape, pressing the edges together with your fingertips to seal. Bring the pointed ends of the tortellini towards each other around your fingertip to form a ring, then press the corners together using your other hand.
Repeat the process with the remaining pasta discs, basil and ricotta; you should end up with 20 tortellini.
Bring a large pan of salted water to the boil. Carefully lower the tortellini into the boiling water, in batches, and cook for 3-4 minutes, or until they float to the surface of the water. Remove from the pan using a slotted spoon and set aside in a bowl, keeping warm. Cook the remaining tortellini.
Add the pesto to the tortellini and mix gently until coated. Sprinkle over the pine nuts.
To serve, spoon the tortellini and pesto onto serving plates. Sprinkle some grated parmesan over each and garnish with a few small basil leaves.