Chop the onions finely and cook them in the butter until transparent.
Blend the nuts and bread together in a liquidiser until you get them to a fine consistency. Pulse the liquidiser if the mixture looks like it is forming clumps.
Heat the stock and yeast extract to boiling point, then combine all the ingredients together and mix well. The mixture should be fairly loose.
Turn into a greased shallow baking dish and make the surface as level as possible. Then sprinkle with a few breadcrumbs.
Bake in the oven at 180C, gas 5 for 30 minutes until golden brown.