There are a few different varieties of shallots, so choosing the best type can depend on what you are cooking, and your own personal taste. The mildest, and largest, variety is referred to as the banana shallot. These are typically the best if you prefer a subtle onion taste, though the more common brown shallots are also fairly mild. The variety with the strongest scent and flavor is the pink shallot, so if you want the onion flavor to really stand out in your dish you should choose those. Regardless of the variety you select, you should inspect each shallot for soft spots, mold, and green sprouts.
The shallot is a type of vegetable that is a member of the same species as the onion and the leek. Like onions, these plants form underground bulbs that are cultivated and eaten. The main difference between onions and shallots is size, as onions tend to be substantially larger. Onions tend to have a stronger flavor as well, which can make the shallot better suited to certain milder dishes. These vegetables are also called scallions in some English speaking countries, though in the United States the name scallion refers to a different relative of the onion that does not form complete bulbs.
Choosing the best shallot can depend largely on the dish you are preparing, since there are a number of different varieties. Brown shallots are one of the most common varieties, and they tend to be quite mild. If you are making a dish that would benefit from a little onion flavor, but you do not want to overpower it, then that can be a good variety to choose. Banana shallots are a variety that is even milder, and their relatively large size makes them a good choice if you need to prepare a lot at once. Another variety, typically referred to as pink shallots, are a good choice if you want a lot of strong onion flavor without using real onions.
There are also several general factors to look out for that apply regardless of the dish you are making or the variety of shallot you have settled on. These vegetables should be firm, so avoid buying any that are soft or mushy. Shallots with soft spots should also be avoided, as should any that have signs of mold or discoloration. Another sign that a shallot is past its prime is green sprouts. You can still use a shallot that has sprouted, though the flavor will typically be stronger and more bitter.