George Osborne in China
George Osborne in China (Reuters)

Whether they like it or not, British prime ministers are often remembered as much, and sometimes far more, for their foreign policies than for any domestic ones. Eden and Suez and Blair and Iraq most definitely; Thatcher and the Falklands and Major and Europe, to a large degree.

Political legacies are, as a result, often determined and even distorted by events that have been thrown unexpectedly at the prime ministers of the time and demanded decisive, clear-sighted action.

It is also absolutely the case that for most prime ministers the cachet, even apparent glamour that comes from taking a significant role on the global stage, jetting around the world attending summits with great leaders pronouncing on the fate of the planet, even involvement in military action, becomes seductive, particularly if they are suffering at home. It can also prove to be their downfall.

So as David Cameron prepares to fly out to Beijing for what he hopes will be a major breakthrough meeting with the Chinese leaders, he has found his own foreign policy under scrutiny, leaving aside the thorny and specific issue of Europe. And it has been far from straightforward.

Special relationship

In his early days in power, Cameron showed he had learnt lessons from Blair's Iraq catastrophe and had no intention of going down that particular path.

He was, he insisted, no liberal interventionist or neo-con "who thinks you can drop democracy out of an aeroplane at 40,000 feet" and the relatively skimpy references to foreign policy in the coalition agreement placed greater emphasis on diplomacy, soft power and trade.

That document stated that the government would "work to establish a new 'special relationship' with India and seek closer engagement with China, while standing firm on human rights in all our bilateral relationships".

It spoke about maintaining a "strong, close and frank relationship with the United States". The famous "special relationship" had been switched, partly in recognition that President Obama was less enthusiastic about it than predecessors but also to emphasise how Cameron though the global centre of gravity was shifting.

So far, these elements of policy have pretty much gone according to script, although Cameron is now facing criticisms that in an attempt to heal the rift with Beijing after his earlier meeting with the Dalai Lama and to win massive trade deals, the human rights element has slipped down the agenda.

The coalition is noted for its insistence on maintaining a large foreign aid budget in the face of mounting attacks from its own MPs and Cameron has not wavered on this, arguing it is in the national interest.

His rejection of "dropping democracy" from bombers, however, changed dramatically thanks to the Arab Spring. First it was Libya when Cameron had what many saw as his "Kosovo moment" - that was the intervention that saw Blair hailed a hero after he bombed Milosevic out of power.

Cameron appeared to be infected when he gambled on action in Libya and won. Many argue it turned his head, just as it did Blair's, and his foreign policy suddenly became one of interventionism. Democracy, it seemed, could be dropped from bombers after all.

But then it all went shockingly and game-changingly wrong for him. He took the hugely important step of recalling parliament from its summer break this year to win backing for intervention against the Assad regime in Syria.

His miscalculation was monumental and he lost the vote in the Commons thanks, in part, to some Labour politicking but also because of widespread opposition on his own benches. It was also clear the public were against such action.

His response to the defeat was, in many eyes, equally wrong and driven by pique rather than clear-headed policy. He claimed the vote meant military action against Assad could never go ahead (it meant no such thing) and he ruled it out for good.

Trade mission

Since then, of course, Libya has proved to have had far less of a clear outcome while the lack of action against Assad has, arguably, led to a breakthrough on his chemical weapons while the picture of exactly who the UK would have been supporting had it engaged in action far less clear.

Diplomacy has continued on Iraq, with Cameron supporting the US initiative to settle the nuclear weapons issue.

Meanwhile there seems to have been another change, back to exactly the type of foreign policy outlined in the coalition agreement of trade and aid, with the emphasis hugely on trade.

Cameron is emphasising the policy he outlined in his 2012 party conference speech when he declared: "We are selling to the world again. When I became Prime Minister I said to the Foreign Office - those embassies you've got to turn them into showrooms for our cars, department stores for our fashion, technology hubs for British start-ups. Yes, you're diplomats but you need to be our country's salesforce too."

And that now seems to be the single most powerful driving force of British foreign policy. Cameron recently led a trade delegation to India and promised to ease visa restrictions for businessmen and he struck a deal allowing China a big stake in the creation of a new generation of British nuclear power stations.

Now, after Chancellor George Osborne broke the ice earlier this month, he is visiting China with a large trade mission with the avowed intention of making the UK a favoured country for investment.

He sees such deals as a big part of helping Britain's recovery and is determined not to be left behind in the global race.

The big question, though, and it is one he faced when he controversially visited Sri Lanka earlier this month, was where that leaves his stand on human rights - as a central plank of foreign policy or something that ultimately plays second fiddle to trade deals.

His performance in Beijing will go a long way towards answering that question and suggesting where British foreign policy is now heading.