Controlling a triac is pretty simple. It looked confusing to me at first because i was looking at it as a transistor. All you have to do is connect it in series with the load using the A and B pins. then you apply a short between pin B and the 3rd pin. I would definately recommend using a triac optoisolator like RussMartin said. It keeps the mains electrically safely isolated from your low voltage circuit. If you ever want to try it out yourself then i would be happy to provide some drawings and part numbers that ive used in the past.
Your choice of relay depends on a few things. You already said you want it to be operated from 5V and control a 240V bulb. You also need to think about how many amps you will be using. Not a lot for a standard 240V bulb. I think most 240V relays could handle that. I would assume you want a PCB mountable one. You can get ones with a different number of switches etc (SPST, SPDT, DPDT etc). I use Rapid for components so i usually start by looking at the relay page. Unfortunately it doesnt give you a lot of information without clicking on each one. 60-4190 appears to be suitable for your needs and is fairly cheap.
Bookmarks