Although poppy seeds do come from the opium poppy, I have my doubts about this story's reliability. When you buy poppy seeds, they are raw, but roasting or cooking them brings out their pleasantly nutty flavor. They become toasted when baked on breads. For hamantaschen, some filling recipes simply call for mixing the seeds with sugar and dried fruit. I find the filling's flavor is far superior when the poppy seeds are cooked in milk or water together with the other filling ingredients.
Poppy seeds are quite perishable because of their high oil content.
They should be stored in a cool place. If they have been ground, it's safest to keep them in the refrigerator and use them promptly. It's easiest to buy poppy seeds ground, but if they are whole you can grind them in a coffee grinder. You can also crush them with a mortar and pestle or roll them with a rolling pin, but you'll need first to soak them in a little warm water to soften them. This tradition honors Queen Esther.