Push the piston back in, put the pads back in, stick a 2-3mm piece of plastic/cardboard in between, bleed the brake, fit it onto the bike.
The width of the pads + the disc will mean that the piston can not come out of the caliper far enough to pop out