A two-period model is considered. In period 1 the electric power company offers for sale a set of contracts (ρ1,p1), (ρ2,p2),.... Each consumer must select one contract k and d units of energy for which the consumer pays pkd. The company must deliver d units of energy in period 2 with probability ρk; the service may be interrupted with the complementary probability 1-ρk. The problem is to design the optimal set of contracts to maximize social welfare when demand and supply may be random and when customers suffer a welfare loss due to service interruption. The best design is shown to be a solution to an optimal control problem. The results contrast sharply with previous work on the problem of pricing electric power in the face of random supply or demand.