"For many years while I worked for Exxon Mobil their slogan was, 'Taking on the World's Toughest Energy Challenges.' I believed that was possible while I worked there, and I still believe it now, even as the challenge becomes more urgent than ever."

Of course, if oil companies don't take steps to reduce emissions, then their prediction that governments won't meet their targets is self-fulfilling. Worse, they set no targets for carbon emissions reductions.

Shell does a better job of describing what will be needed to achieve holding temperature rise to no more than two degrees Celsius, including setting itself ambitious carbon reduction targets. Unfortunately, it then falls short by not describing what concrete actions it is taking to meet those targets.

An argument can be made that oil and gas companies are just reflecting the unfortunate situation they find themselves in, but that's not enough, and it's not what investors are asking for.

Investors need oil and gas companies to make the case that they can become part of the solution to climate change, while remaining profitable. Companies must prepare credible, transparent plans, and actively promote and support government policies to shift to a low-carbon energy mix.

For a start, oil and gas companies must take Paris climate targets seriously. This means working out what they can emit, as part of a real effort to limit global temperature rise. Starting now, companies must set real targets for carbon emissions reductions and outline plans to achieve them.

Progress should be transparently reported, with the costs of change accounted for. Investors, both institutional and individual, must reward those companies that develop and execute them.

Governments, for their part, must establish the needed incentives, like a carbon tax, which many oil and gas companies claim to support. This would level the playing field, rewarding companies that take action. It is not enough for oil companies to sit back and wait for government action.

Voicing support for a carbon tax through the Climate Leadership Council is good, but it's time to start actively lobbying for such policies, and supporting politicians who will enact them. Despite their public declarations, a recent report by the 50/ 50 Climate Project found that many U.S. oil and gas companies were, in fact, doing the opposite, spending money to protect their traditional business models.

Ultimately, oil and gas companies need to become what they claim to be; "integrated energy companies", rather than integrated fossil fuel companies. The laudable mission statement of many oil and gas companies is to provide affordable energy to improve the world's living standards in an environmentally sound manner.

A fully integrated energy company is one whose energy supply chain reflects a mix of energy products, which could include solar, wind, and nuclear, that delivers its emissions reduction targets. Research, development, and deployment of new technologies that deliver the energy the world needs at increasingly lower emissions and costs will be crucial to achieving this.

These companies produce a product that is critical to a range of industries. It's therefore important for them to outline for investors, plans to engage with sectors like automobile manufacturers, shipping, and utilities to help them achieve their own part of the transition.

For many years while I worked for Exxon Mobil their slogan was, "Taking on the World's Toughest Energy Challenges". I believed that was possible while I worked there, and I still believe it now, even as the challenge becomes more urgent than ever.

Oil and gas companies must do everything they can to create a better future for the planet in partnership with governments, investors, and other industry sectors.

If they do, they'll help secure a sound, long-term financial future for a transformed energy sector. If they don't, it's not just the planet that will suffer, but dissatisfied investors may decide our energy future lies elsewhere.

Commentary by Bill Hafker, a former Exxon Mobil executive who started at the company in 1980 and retired in 2016 as a senior engineering advisor and environmental global technology sponsor.

For more insight from CNBC contributors, follow @CNBCopinion on Twitter.