Might be too late now, but don't let it dry, spray it with a laundry stain spray and rewash it. If it was a white shirt a little bleach or some of that oxygenated laundry powder might do the trick. If that causes the stain to fade, do it again. Key is not to let the dye set by allowing it to dry.
For the future, they make something called (in the US anyway) a color catcher. You throw it in the wash and it absorbs dye which is floating in the water. We use it for the baby clothes because there are never enough to really fill the washer if we separate by color.
Good luck!