Melt the butter over medium-high heat in a 12-inch frying pan. Add the shallot, garlic, and salt and cook, stirring frequently, until softened, about 3 minutes.
Sprinkle in the flour and cook, stirring constantly, for one minute.
Pour in the broth and capers, grind in some black pepper, and stir well to incorporate all the flour.
Bring to a boil, then reduce heat and simmer for five minutes.
Stir in the beans and simmer for about five minutes more, until warmed through.
Off the heat, stir in the pecorino and lemon juice. Serve warm.
