Place the shallots and all the other ingredients up to and including the water in a food processor, blend to a paste.
Heat the peanut oil in a casserole dish. Add the spiced paste, cinnamon, cloves, star anise and cardamom, cook for approx. 3 mins. Salt the meat, add to the dish and cook in batches for approx. 3 mins. per batch. Pour in the coconut milk and bouillon, add the kaffir lime leaves, coconut flakes and sugar, cover and braise for approx. 1 hr., stirring occasionally. Remove the lid and finish cooking for approx. 45 mins.
Remove the cinnamon, cloves, star anise, cardamom and kaffir lime leaves, salt the braised beef and sauce, top with fried onions.