I also recommend fresh ground flax (and, if you can, get "golden flax," which tastes better, IMO. Now foods sells it (a brand carried in many health food stores).
Between oil and capsules, I'd say that capsules would have less of a chance to go rancid because the oil is sealed in. Otherwise, flax oil can spoil much quicker than whole flax seeds.