1Heat oven to 350°F. Heat 1 tablespoon of the oil in a large frying pan over medium-high heat, add shallots and garlic, and cook until fragrant, about 1 minute. Add tomatoes and season well with salt and pepper.
2Reduce heat to medium low and cook until nearly all liquid has evaporated, but tomatoes are still slightly chunky; transfer to a bowl and reserve. Wipe out frying pan, return to stovetop, and heat remaining 1 tablespoon of the oil over high heat. Season cod all over with salt and freshly ground black pepper, and, once oil shimmers, add cod and cook until nicely browned, about 2 minutes per side.
3Transfer fish to a baking sheet and place in oven to finish cooking. (According to Chef Ripert, an easy test for doneness is to insert a metal skewer into the center of a fillet for 5 seconds. The fish is done when the skewer goes in easily and, when removed, feels slightly warm to your lip.)
4Place 1/2 cup of the beans in a food processor with the reserved bean-cooking liquid and purée until smooth to make the sauce. Season well with salt and pepper.
5To serve, spoon tomato compote in the center of each plate and place a cod fillet on top. Spoon bean sauce outside the compote, and sprinkle reserved whole cooked beans around the fish and over the two sauces. Garnish with a few drops of truffle oil, if desired.
Beverage pairing:Olivier Leflaive Pugliny-Montrachet, France. A rich, full-bodied white fish like cod makes a good pairing with Chardonnay from a hallowed appellation, in this case Puligny-Montrachet in Burgundy. This Chardonnay has good body to match the fish, but also acidity to cut through it. Flavors of white flowers, lemon and mineral accent the rest of the dish.