While the leeks are roasting, in a medium skillet, melt 2 tbsp of the butter over medium heat. Once melted, add the onions. Sauté for 2 minutes and then add the leeks (the moisture from the onions will keep the shallots from burning). Stirring occasionally, cook the onions and shallots for 15 min till soft and golden. (If you have the time, you can do this longer and really caramelize them).