For years, renewable energy has been touted as the source that would be replacing fossil fuels very soon. Yet renewable energy sources accounted for just 12.5% of the global primary energy consumption in 2020. Surely, there has been a steep rise in the share of renewables in the global energy mix in the last few decades. Fossil fuels still fulfill more than 80% of the world's energy needs.

That means while a transition to renewables looks inevitable, it would be far slower than expected, spanning over several decades. Moreover, fossil fuels will have a crucial role to play in making this transition possible. In other words, it is prudent to take a holistic view when considering energy sources needed to meet the world's demands.

Here are two oil companies doing precisely that.

1. Shell

Shell (SHEL 0.54%) believes that expanding in the fast-growing clean energy segment makes good business sense for it in the long term. As an established global energy company with huge operations, the integrated energy company believes it is well placed to lead this transition.

By 2025, Shell aims for around half of its total capital expenditures to be in low- or no-carbon products and services. Most of this is expected in segments such as biofuels and hydrogen, power, carbon capture and storage, and convenience retail, including charging for electric vehicles. It also includes expenditure in Shell's chemicals and lubricants business. Shell expects to incur $19 billion to $22 billion of base cash capital expenditure annually. 

In 2022, Shell expects the expenditures on low- or no-carbon products and services to be roughly one-third of its total capital expenditure. At 2.9%, Shell's dividend yield is lower than that of its top peers.

SHEL Dividend Yield Chart
Data by YCharts.

However, the company is committed to an annual per-share dividend growth of around 4%. Further, the company's debt ratios compare favorably with its peers.

Overall, Shell is looking to pivot away from oil and gas and toward renewables. And it has laid down a clear strategy for the same.

2. TotalEnergies

French oil and gas giant TotalEnergies (TTE 0.26%) aims to grow its renewables business steadily in the coming years. By 2050, the company envisions roughly half of its sales coming from renewables and electricity. To this end, the company plans to spend $3.25 billion to $4 billion per year on renewables and electricity through 2025. 

TTE capital investments.

Data source: TotalEnergies.

Additionally, it plans to spend $650 million to $800 million per year -- or roughly 5% of its expected annual capital expenditures -- on hydrogen and biofuels during this period. Importantly, TotalEnergies plans to spend around 57% of its research and development budget of $1 billion for 2022 on clean-energy technologies.

TotalEnergies believes that being an early mover in the rapidly growing renewables space would help it establish itself firmly in the long run. The company thinks it is the right time to secure long-term positions in land, marine, and grid interconnections. Moreover, it's a strategy TotalEnergies executed successfully in the oil and gas space decades ago. 

TotalEnergies aims to combine renewable and flexible generation, storage, trading, and supply. Such an integrated approach will help it capture value in the volatile power market. By keeping 30% of its generation exposed to market prices, the company believes it can capture more upside than regulated utilities, which have all their generation covered by PPAs (power purchase agreements). 

TotalEnergies didn't cut its dividend in the challenging year of 2020, although peers BP and Shell did, showing a commitment to shareholders. At a dividend yield of 5.7%, the stock looks attractive.

Should these oil stocks be on the investing radar?

Overall, both TotalEnergies and Shell are working to position themselves for long-term growth. But they are also focusing on their oil and gas operations to generate value for their shareholders, until the renewable-focused investments generate returns that exceed those from oil and gas projects.

Although the strategy looks sound, investors should note that these companies may generate lower returns on capital in the short term than peers adopting a more fossil fuel-focused approach.The latter could yield favorable results in the near term as energy commodity prices are currently strong.