The main purpose of this paper is to study the existence of stationary solution for stochastic partial differential equations. We establish a new connection between backward doubly stochastic differential equations on infinite time horizon and the stationary solution of the SPDEs. For this we study the existence of the solution of the associated BDSDEs on infinite time horizon and prove it is a stationary viscosity solution of the corresponding SPDEs