Do this right as you are thinking of it (!) If you keep a grocery shopping list, put a note to get double of one of your favorite items and give the second to a food bank. If you don't use a shopping list, especially you young people who don't do a regular housekeeping type shop, put a reminder on your mobile device, or hand written in your wallet with your money or your charge card, to remind yourself to buy double of what you are buying and give the second to a local food bank or pantry.
Here's what you need to remember: it's a favorite thing, a "special" thing for the holidays, but still a routine usable item. Too many people think of just buying canned goods like beans and soup for pantries. Those are great and don't stop doing them, but raise it up a notch recognizing the poor and disadvantaged like and miss the same items you do. The example I most use is coffee. Instead of a can of beans think how much a can of coffee would bring joy and help a poor family's budget (and watch for the sales, Wal Mart recently had a great price for large coffee and if I'd had money I'd have bought some for pantries). Check with your local pantry if you want to be sure of what they need (everything) and if they can take refrigerated items too but remember they tend to "ask down" also, afraid to ask for too many more costly or "frivolous" items.
Nothing is frivolous during Christmas and Hanukkah. For example, buy bagged candy that you like and get a second one for the pantry, cuz remember that kids in poor families or those who have lost their jobs etc will still love candy for the holidays that their parents can give them via these pantries.
This is a great way to keep pantries better stocked year around, if every time a person shops they buy two of one of their own items. But my focus is really on the holidays now where as those with funds are able to buy nice things for themselves, buy a second one of something you love and give it to a pantry or food bank. Start this week because this is the crunch time as pantries have to build up and dispense supplies throughout the month.