The government has set out its plans to alter trade rules agreed with the EU after Brexit.