Any such railroad company, owning and operating any plant in this state for the production of electricity and power primarily for its own use, may sell and dispose of any surplus electricity or power not required for its use, under such regulations as are prescribed by law or by the public service commission of the state by authority conferred upon it by any law: Provided, That in the case of a corporation engaged or heretofore engaged in the operation of street or interurban railways by electricity, or other motive power than steam, it shall have the right to furnish and sell to the public electricity, water and gas, either natural or artificial, or both, and to purchase, hold and use such property, rights, privileges and franchises as may be necessary in the generation, production, manufacture and sale to the public of such electricity and gas, and in the storage, filtration, distribution, delivery and sale to the public of water: Provided further, That no right, privilege or franchise granted under this section or now held shall be exercised without first obtaining from the public service commission, if provided by law, the authority so to do, and, in the event of sales within a municipality until after having first procured a franchise therefor from the municipality in which it seeks to operate.
W. Va. Code § 31-2-4