Place lentils in a large saucepan. Fill pan with water and bring gently to a boil. Remove saucepan from heat and let lentils soak in hot water for 1 hour.
Drain lentils and cook with onion in salted water until tender. The length of time for cooking lentils depends on their type and their age. In any case, after ½ hour look at them from time to time to see if they are cooked.
When ready, drain. Heat olive oil in a saucepan; add finely chopped garlic and lentils, and continue to cook, shaking pan from time to time, until lentils are heated through.
Pound anchovy fillets and butter to a smooth paste, and add to lentils, stirring in well. Season to taste with salt and freshly ground black pepper. Place in serving dish and serve very hot.