Place the shallots and garlic in a small saucepan. Add water to cover and bring to a boil. Reduce the heat and simmer until tender, 7 to 10 minutes. Drain, and set aside.
Cut a small X in the root end of each pearl onion, being careful not to cut completely through the end. Bring a saucepan of water to a boil. Drop in the onions, then reduce the heat and simmer