Method
Heat the oil in a large skillet over medium-low heat. Add the shallots and cook, frequently stirring, until soft and translucent, about 8 minutes. Do not brown. Add the beans, salt, pepper, and water; bring to a boil. Cover the skillet, reduce the heat to low, and cook for 8 minutes.
Remove the lid and increase the heat to high. Cook, frequently stirring, until the liquid is evaporated, the beans are tender, and the shallots are jammy, about 6 minutes. Taste and adjust the seasoning with salt, pepper, and a pinch of sugar.