Boris Johnson and U.S. President Donald Trump meet at the UN headquarters in New York on September 18, 2017 Brendan Smialowski | AFP | Getty Images

When some of the world's most powerful leaders meet in France this weekend for the Group of Seven (G-7) summit, the focus will be on how well (or badly) they get along given a backdrop of widespread disagreements and divergent policies over global trade and geopolitics. Prime Minister Boris Johnson will be in the spotlight as the meeting in Biarritz will be the first he has attended since becoming the U.K.'s leader in July. The summit comes at a delicate and uncertain time for the U.K. as its relationship with its closest neighbor Europe undergoes a seismic shift with Brexit, and it looks to the U.S for closer trade ties. At the G-7, Johnson will find himself face-to-face with the leaders of France, Germany and Italy who, along with the rest of the other 27-countries in the EU, have essentially told him that the Brexit deal he inherited from his predecessor Theresa May is the only one on offer and cannot be changed.

He will also find himself meeting President Donald Trump, one of the most contentious leaders to represent the U.S. at the G-7 in years, to discuss a potential post-Brexit trade deal. In sum, the U.K. finds itself in a tricky position — at the same time that it is trying to court EU leaders before a October 31 deadline for Brexit, it is trying to woo Trump — not the most popular person in Europe right now. Trump has signaled that Europe could be the next target when it comes to what he sees as unfair global trade practices against the U.S. In May, he accused the EU of treating the U.S. "worse than China" and he has threatened its car industry with a 25% tariff. So low are expectations of any substantial agreements between the leaders of the U.S., U.K., Canada, France, Germany, Italy and Japan that the French President Emmanuel Macron, hosting the event, has said there will be no final communique on shared commitments that might have been arrived at the summit.

G-7 is a 'test' for Boris Johnson

Given tense relations between Europe and Trump, Johnson will be put in a difficult position at the G-7 summit. Kallum Pickering, senior U.K. economist at Berenberg Bank, said Johnson would have to be diplomatic. "Looking throughout history, the most successful U.K. prime ministers — Thatcher, Blair, Churchill (in no particular order) — have been able to court both the U.S. and the continental European powers simultaneously to gain an advantage for the U.K.," he told CNBC Thursday. "The politics is far too messy to make a strong prediction about how U.K.-EU or U.K.-U.S., and, of course U.S.-EU, relations will play out in the coming months/years. But given the unique circumstances (the U.K. finds itself in), this will be a good test for Johnson." Trump championed Johnson for the leadership of the U.K.'s ruling Conservative Party and various media reports suggest that the president wants to meet Johnson at the G-7 ahead of other leaders. In fact, the U.K.'s Times newspaper reported earlier in August that Trump wanted to meet Johnson before other European leaders to "send a signal" to them.

Johnson might also be able to use Trump's support to his own advantage, according to Tom Raines, head of the Europe Programme at London-based thinktank Chatham House. "The summit is an opportunity to look prime ministerial and Johnson will probably see it as a chance to showcase a more energized Britain on the world stage," Raines told CNBC Tuesday. "He may also try to leverage his apparent rapport with Trump to highlight the potential of a U.K.-U.S. trade deal post Brexit, and get some kind of endorsement of his approach to negotiating Brexit. That won't help him much with the Europeans though," Raines noted. But despite Johnson's supposed closeness with Trump, and the two men have a surprising amount in common, he is still ideologically closer to his European counterparts. Recent geopolitical events and disagreements, over Iran's international nuclear deal for example, have seen the U.K. side with its closest neighbors rather than the U.S. "At the point at which it is leaving the EU, it finds itself much closer to the European position on most big issues than to the Trump administration: on climate change, on international trade, on the Iran deal … It is an uncomfortable position for the U.K. — caught between a more unilateral America and the EU it is trying to leave," Raines said.

US-UK trade deal