In a heavy frying pan, heat the oil and saute the onions until they are just wilted.
Place flour, baking powder and salt in bowl. Make a well in the centre and pour in the egg, butter and milk. Mix together lightly, then add the onions, shallots, salted cod fish, salt and pepper. Stir well. Drop by tablespoon full into hot oil, but do not crowd them in the pan.
Serve when the mixture is ready.