“Whenever you pray, go into your room, close the door, and pray to your Father who is hidden. And your Father who sees from the hidden place will reward you.”
(International Standard Version)
Here is the context of the quote:
And when you pray, you shall not be like the hypocrites, for they love to pray standing in the synagogues and on the corners of the streets so that they might be seen by men. Truly I say to you, they have their recompense.
But you when you pray, enter into your inner room, and having shut your door, pray to your Father, the One in secret. And your Father, the One seeing in secret, will reward you.
And when you pray, do not babble on like pagans, for they think that by their many words they will be heard.
Do not be like them, for your Father knows what you need before you ask Him.