The EU's foreign affairs are driven by its Common Foreign and Security Policy (CFSP) and also through the Commission-led economic trade negotiations.
Foreign policy is still largely the domain of the member-states however and there has been significant disagreement between members.