I am going to design an infrared emitter circuit to detect a shaft position. And when the shaft is in front of the emitter then the reciever doesn't receive any signal and therefore detects that the shaft has reached the position.
I should use the forward bias for the emitter led but what should I do for the reciever part?
An IR receiver usually uses a photo-diode or photo-transistor at its input.
A photo-diode that is reverse-biased is fast because the bias reduces its capacitance. Light makes it leak current.
A photo-diode with no bias is a mini solar cell that produces an output when lit.
The collector-base of a photo transistor leaks current when lit and the transistor amplifies it.
A typical position sensor light barrier (e.g. in a printer drive) uses a photo transistor with a several kohm pull-up resistor.
The essential point is that you can avoid extraneous light hitting the sensor. In applications where this can't be guaranteed by design, a modulated light barrier should be considered.