Melt 2 tablespoons unsalted butter in a large heavy skillet over medium heat. Add onions and shallots; saute until very soft and light brown, about 20 minutes.

Position rack in lowest third of oven. Preheat to 400 degrees F (200 degrees C).

Season turkey cavity with salt and pepper. Place turkey, breast side up, on a rack in a large roasting pan. Slide hand under skin of turkey breast to loosen skin. Spread half of herb butter over breast under skin. Rub remaining herb butter over outside of turkey.

If stuffing turkey, spoon stuffing loosely into main cavity; it will expand as it cooks. Tie legs together loosely to hold shape of turkey.

Pour contents of roasting pan into a strainer set over a large bowl. Skim fat from pan juices using a large spoon. Transfer the onion mixture to a blender. Add 1 cup pan juices, and puree until smooth, adding more pan juices and chicken broth if necessary to thin sauce to desired consistency. Transfer sauce to a large saucepan, and bring to a boil. Cook until color deepens, skimming off any foam, about 5 minutes. Season with salt and pepper.