I use a rig like Denny linked, and it works really well. The key is to chill your bottles and also wet them inside before filling to reduce foaming. Vent your keg pressure, then set the regulator to 2-3 psi, just enough to push the beer. As you fill, you'll need to press in on the rubber stopper once in a while to vent the head pressure and keep the beer flowing. Fill until foam comes out the top and beer reaches the stopper. This means you'll spew a bit of foam out, but the losses are very minimal. Then cap it up. You can put a cap on, hold the cap and give the bottle a quick sideways turn to stimulate a burst of foam. This displaces any oxygen in the headspace. Quickly crimp a cap on and you're good to go.
I've kept beer for over a year this way with no loss in carbonation and no degradation in quality.