We address the multi container loading problem of a company that has to serve its customers by first putting the products on pallets and then loading the pallets into trucks. We approach the problem by developing and solving integer linear models. To be useful in practice, our models consider three types of constraints: geometric constraints, so that pallets lie completely inside the trucks and do not overlap; weight constraints, defining the maximum weights supported by a truck and by each axle, as well as the position of the centre of gravity of the cargo; and dynamic stability constraints. These last constraints forbid empty spaces between pallets to avoid cargo displacement when the truck is moving, and limit differences between the heights of adjacent pallets to prevent tall pallets tipping over short ones. We also consider extensions of the models to the case of heavy loads, requiring a special configuration of the pallets in the truck, and to the case in which the demands must be served over a set of time periods to meet delivery dates. The models have been tested on a large set of real instances involving up to 44 trucks, obtaining optimal solutions in most cases and very small gaps when optimality could not be proven.