Storing Onions, Shallots, and Scallions
Whole Onions
Whole onions, including white onions, yellow onions, sweet onions, red onions, and shallots, are in the root vegetable zone, lasting for up to a month outside the refrigerator if they're stored in a cool, dark spot in a breathable bag or other container. They'll keep that way for at least a month. The refrigerator may actually hasten the demise of your whole onions and encourage them to sprout.
Cut Onions
Chopped onions are best kept in an airtight container or resealable plastic bag in the fridge, where they'll be OK for up to 10 days.
Scallions and Leeks
Scallions or leeks are best kept in a glass jar with an inch or two of water in the bottom to keep their roots submerged. Scallions that you've stored this way can even regrow after you've cut pieces from their tops, as long as you keep the jar in a spot that gets some sunlight and change out the water occasionally.