Spread the flour on a plate and coat each beef cheek in flour, shaking off the excess and season well with salt and freshly ground black pepper.
Heat a big splash of olive oil in a large pot over a medium-high heat and working in batches, add a few cheeks at a time and fry until browned on both sides. Remove the beef and set aside.
Lower the heat (add more olive oil if necessary), add the onion and carrots to the pot and gently fry until soft and translucent. Add the garlic, rosemary, thyme and bay leaves and cook for a further minute.
Stir in the stock, tomato paste and sugar, return the beef to the pot submerging it in the sauce and bring to the boil. Cover and simmer for 3 hours or until the beef is falling apart.
Pre-heat the oven to 180°C/350°F and roast the butternut 30 minutes before the beefs cooking time is up. Place the butternut cubes into an oven-safe dish, drizzle with olive oil, season with salt and pepper and roast for 20 to 30 minutes or until cooked through and caramelised.
Remove the beef cheeks from the pot and leave them to cool slightly. Using two forks or your hands, pull the beef apart to create a shredded texture.
In a bowl, combine the shredded beef, butternut and ricotta cheese to create the pie filling.
Lay one sheet of phyllo down, lightly brush with melted butter and place another sheet on top of it. Spoon a quarter of the filling on the bottom edge of the pastry, lightly brush the rest of the sheet with butter and roll the pastry up into a log, tucking the edges in as you roll so the filling doesn’t fall out.
Repeat with the remaining filling and 6 pastry sheets then place the pastry rolls into an oven-safe skillet/pie dish and brush with butter.
Bake in the 180°C/350°F pre-heated oven for 25 to 30 minutes or until the phyllo is golden and crispy. Garnish with toasted pine nuts and serve whilst hot.