There are some best cases to keep stored batteries in best shape.
If possible store batteries in their original packaging. That way you are always sure they haven’t expired. This also provides a way to keep track of purchased batteries and prevents mixed use of older and newer batteries, which could possibly lead to leakage or malfunctioning. And finally, keeping them in the original package prevents the batteries for external short circuiting and oxidation.
As stated above, never mix up different batteries, and keep all types/grades of batteries stored separately as this will prevent accidental short circuiting.
Store the batteries at room temperature or in a cool environment, but please avoid high humidity and direct sunlight. Ideal storage temperature is between 10 and 25 °C in a dry environment.
Too high temperatures (+35°C) should be avoided, as it can influence the level of self-discharge (high storage temperature increases the amount of self-discharge).
High humidity should also be avoided, for it may cause condensation on the batteries, which could cause short circuiting.
In theory, cold storage temperatures are good for the battery however, if stored in a refrigerator there is a very high risk of condensation and thus malfunctioning of the battery. Also, if the battery is stored in cold environments, it should be kept at room temperature for at least 24 hours before using it.