Shell has committed itself to spending over $30bn (£17.7bn) buying back its shares and handing out higher dividends over two years.

The promise came as the Anglo-Dutch business more than doubled second quarter profits to $5.1bn as measured on a current cost of supplies basis.

The company has taken advantage of high oil prices and a better performance but took another near-$1bn in writedowns for US operations that have fallen in value.

These are believed to cover shale gas assets, some of which are being sold off along with other poor value fields in Australia, Canada and Brazil.

Ben Beurden, the new chief executive, said Shell had already started to improve under his watch and had "huge potential" for growth.

"We are making progress with the priorities I set out at the start of 2014: to balance growth and returns by focusing on better financial performance, enhanced capital efficiency, and continued strong project delivery," he explained.

And he said the company would be increasing the payout to investors by 4% in the second quarter just ended. "We are expecting some $7bn–$8bn of share buybacks for 2014 and 2015 combined, of which $1.6bn were completed in the first half of this year.

"These expected buybacks and dividend distributions are expected to exceed $30bn over the two-year period. All of this underlines the company's recent improved performance and future potential."

Buying back shares reduces the number in circulation so should boost their value and thus be welcomed by investors. But some critics always argue that buybacks are of no proven value and a waste of money.

There was no immediate comment from the company on the future of its operations in Nigeria, one of its most troublesome businesses due to attacks on its pipelines.

Among the risks listed by the company in its financial statement is one on global warming. It says: "Rising climate change could lead to additional regulatory measures that may result in project delays and higher costs."