When you buy pellet hops they often come in silver mylar bags that keep out oxygen and light. to You can use a heat sealer to reseal the unused portion and keep in the refrigerator.
improved accuracy, hops are not ALWAYS sold in mylar bags, but are found that way quite often.