In this paper, a stochastic approach is presented for optimal planning of an integrated natural gas and electricity network. The planned network can play an important role in the smart cities in order to reduce the emission pollution and operation cost. In addition, various resource and elements of a sustainable green energy system including renewable energy units and energy storage are modeled. A comprehensive investigation is carried out based on different scenarios and the extracted simulation results are discussed. In order to guarantee the global optimum results, the modeling equations of the studied problem have been linearized and the problem became to a mixed-integer linear programming (MILP). The linearized problem optimized using a mathematical based optimization algorithm.