Preheat the oven to 180 degrees C. Toss the liver in the flour and a little seasoning to lightly coat. Heat the oil in a heavy, deep frying pan, then stir-fry the liver and bacon until lightly browned. Transfer to a plate and set aside.
Add the shallots and carrots to the pan and cook, stirring frequently, until lightly coloured. Add the mushrooms and cook, stirring often, for 2 minutes, then add the garlic, rosemary, stock and sherry. Bring to the boil, stirring.
Return the liver and bacon to the pan and stir well. Transfer to a 1 litre pie dish, mounding the filling in the centre, then cool while making the pastry.
Combine the flour, breadcrumbs, rosemary, shortening and seasoning in a bowl. Stir in enough cold water to make a soft (not sticky) dough. Turn out onto a lightly floured surface and roll out to be slightly larger than the pie dish.
Dampen the rim of the dish, then gently lift the pastry over the filling and press the pastry to the rim to seal. Trim off any excess pastry with a sharp knife, make a steam hole in the middle and press the back of a fork or your thumb onto the pastry rim. Bake for 30–35 minutes until golden, then serve hot.