Pecans along many other types of nuts can last a long time while they are still in the shell, up to 2 ½ years in fact. It is recommended that you store your pecans in the freezer if you will not be using them for a while though, just to make sure that they do not become rancid or stale.
These nuts along with many others tend to go rancid fairly quickly because of their high fat content, so it will therefore be extremely important to make sure that you store them either in the refrigerator or in the freezer. You do not want to keep your pecans sitting at room temperature because they are likely to go bad quickly, rendering them inedible. While it is true that pecans can keep for a long time, you will still need to store them properly.