Heat oven to 240C/220C fan/gas 9. Toss the baby courgettes with half the oil in a roasting tin and roast for 10 mins, until the courgettes are starting to colour.
Reduce oven to 180C/160C fan/gas 4. Heat the remaining oil and butter in your largest frying pan and soften the onions and garlic gently. Add the grated courgettes, and turn up the heat. Cook until softened. Stir in the orzo and wine, if using, for a minute, then turn off the heat and stir in the stock, most of the Parmesan and some seasoning.
Transfer to a baking dish and arrange the baby courgettes on top. Bake for 15 mins, take out of the oven and scatter with breadcrumbs and the remaining Parmesan and bake for 10 mins more. Eat immediately.