Make the pesto:
Pulse the basil, garlic and pinenuts in a food processor to a coarse paste, adding enough olive oil to produce a loose-textured puree. Pour into a bowl and fold in the parmesan.
Cook the garlic:
Blanch the 6 cloves in boiling water for 3 minutes. Drain all the water off then add 200ml of the stock and half the butter. Simmer, uncovered, for about 15 minutes until the garlic is really soft and the stock and butter have reduced to a syrupy glaze. Remove from the heat. (You can do this up to 4 hours in advance).
Cook the pumpkin:
Heat oven to 200C. Toss the pumpkin cubes with the olive oil, season and roast for 10-15 minutes until just tender.
Make the risotto:
Sweat the onion in the remaining butter in a large shallow pan until soft – about 5 minutes. Tip in the rice, raise the heat and toast the rice until translucent. Lower the heat and add the remaining stock a ladleful at a time, stirring well until the stock is completely absorbed before adding the next ladleful.
Once the rice is al dente, fold in the two cheeses, garlic cloves and pumpkin. Cook for a further 2 minutes.
Serve with a drizzle of pesto on top.