Olive oil has a shelf life of two to three years when properly stored in a pantry. It does not matter if the olive oil is opened or unopened.
Olive oil can go bad. If the oil develops a rancid or wine-like smell, it has probably spoiled. The best way to store olive oil is in its original container in a cool, dark place, such as a pantry. Some flavored olive oils may contain ingredients that reduce the shelf life of the oil or require refrigeration after opening. One should carefully check the label of flavored olive oils to see if there are special storage requirements recommended by the manufacturer.