A transistor, which the output of the 4N35 is, needs a load or pull up resistor taken to VCC (the circuit posted by Trevora using the 6N137 already has one with R3).
You can switch an internal pull up resistor into circuit on an Arduino input pin, I normally don't bother and use the external circuitry as with the 6N137
BTW pins 5 & 8 on a 6N137 are not "no connections", they go to the internal circuitry which is a lot more than what the basic schematic shows and must be used.