Donald Trump and Vladimir Putin have shared a brief encounter ahead of their highly anticipated meeting on the sidelines of the G20 summit in Germany.