The 'shock treatment' referred to is known as ECT or Electroconvulsive therapy, a form of psychiatric treatment (usually for major depression) which was developed during the 1930's.
It involves the inducing of seizures in a patient through the administration of electric shock to the brain via electrodes placed on either side of the head.
Nowadays, patients receiving ECT are given a short-acting anaesthetic and a muscle relaxant to prevent a full-blown seizure occurring. However, during the 1940's and 1950's, ECT was often given in its 'unmodified' form without anaesthesia or muscle relaxants.
It is this primitive form of ECT which Esther Greenwood is about to receive.
Sylvia Plath was given ECT as an out-patient in the summer of 1953.