Next the sensor. Emitter to ground, collector to a digital input pin, plus a resistor (about 10K) from that input pin to 5V.
Or you can use the internal pull up resistors
You will need to set the pinMode to input anyway:
pinMode(pin, INPUT); // set pin to input
if you write a HIGH value after the pin is set for input then the internal pull-up resistor will be connected:
digitalWrite(pin, HIGH); // turn on pullup resistor
This saves you connecting an external 10k resistor to the pin.
You should be able to see it glowing if you look at it through a digital camera.