Sift the flour and place in a mound on a board. Place the oil and salt in the center and lightly knead, adding a few tablespoons of water in order to obtain a smooth, soft dough. Knead the dough and then leave to rest in a cool place for half an hour, wrapped in a damp cloth.
Meanwhile, wash and pit the olives, mix with the tofu and blend in the mixer to obtain a rather thick cream. Peel and slice the shallots, place in a pan with the oil and cook until soft, then add the tofu and olive cream. Cook for a few more minutes to dry out the mixture a little and then remove from the heat.