US food giant Kraft has reported a 22% rise in quarterly earnings on lower costs, offsetting a slowdown in shipments as retailers such as Kmart trimmed inventory.