Use a funnel.
I personally have never had this problem on my SoftSoap refills. The big bottles have a small squirt port in the cap, so I remove the pump in the small bottles, place the squirt hole directly onto the opening of the pump bottle, and refill.