Peel the potatoes and cut them into strips. Peel and cut the onions into thin slices. Cut the majority of the anchovy filets into smaller pieces.
Grease an ovenproof baking dish and cover the bottom with a layer of potatoes, then add half the onions and half the anchovy pieces. Another layer of potatoes, then the rest of the onion and anchovy pieces. Finish with a layer of potatoes with a few whole anchovy filets on the top. Flatten the surface. Mix the pepper and salt into the cream, pour the cream on until it is almost visible through the potatoes. Place a few pats of butter on top and, if desired, sprinkle with some breadcrumbs.
Bake in the oven (250°C/475°F) for about an hour.
Serve with sliced pickled beetroot or beetroot salad.