I would say the best way is to boil the pipe if possible, or submerge it in hot water to get the resin more goo-like. Then use a unbent paper clip to pull out as much as possible.

I personally think resin is terrible for you and shouldn't be smoked, but desperate times call for desperate measures. Smoking resin gives me a killer head ache...it does get you blazed off your ass though.