The correct answer is Option B.
We are to choose from the given options the preposition that correctly completes the sentence.
Option A: WITH is used where there is a meaning of connection and companionship. There is no such meaning intended in the given sentence.
Option C: FOR is used in the meaning of relation or favour or reason and it is not grammatically correct in the given sentence.
Option D: FROM means 'starting point', but there is no en-point mentioned in the sentence. There is no such meaning intended in the given sentence.
Hence these options are not the correct options.
Option B: TO is used to indicate direction or destination. The destination of the devotees is the temple. The temple attracts the devotees.
Therefore Option B is the correct answer.