Bring a pan of lightly salted water to the boil, add the sprouts and cook about 8-10 minutes, until just tender. Drain and rinse with cold water to stop the cooking.
Bring another pan of water to the boil. Add the shallots or pearl onions and cook 2 minutes. Drain and rinse with cold water. Slip the skins off and remove the stem ends.
Heat 1 tablespoon butter in a large, heavy skillet. Put the shallots or onions into the pan, sprinkle with the sugar, salt and pepper. Cover and cook over medium-low heat 7 minutes, stirring occasionally. Add the fennel and continue cooking 5 minutes.
Combine the walnuts with the broth in a small pan and bring to a boil. Continue boiling until the mixture is syrupy.
Add to the shallots (or onions) and fennel along with the sprouts and remaining tablespoon butter. Stir over medium-low heat until the sprouts are heated through.