This Just InI'm packing up my study, and I found a bag of peanut flavored M&M's in a box I'd never unpacked from our previous move in 1999.
17 years old.
What? Of course! Do you think I'd just let them sit there in the package?
Conclusion: useful shelf life of peanut flavored M&M's is at least 17 years. They tasted fine.