Patients with severe depression are among those who can have ECT
Electric shock therapy should only be used on patients as a last resort, an NHS watchdog has ruled.
The National Institute for Clinical Excellence has said electroconvulsive therapy (ECT) should also be restricted to certain types of patients.
These are those who are severely depressed, are catatonic or who have had a prolonged or severe manic episode.
It rejected calls for the treatment to be made available to people with less severe depression or those with schizophrenia.
Thousands of people across the UK have ECT every year. The most recent figures available, which date back to 1999, show that between January and March of that year 2,835 people had the treatment.
Patients undergoing this treatment usually have two sessions a week for between three and six weeks.
ECT is controversial. It involves placing electrodes on the temples, on one or both sides of the patient's head and delivering a small electrical current. This aims to shock the brain and to restore its natural chemical balance.
The treatment was first used in the 1930s. However, critics say there is little evidence it works and not enough is known about its long-term effects.
Some patients say the treatment badly affects their short and long term memory.
We still want to see robust safeguards that will prevent people from being given ECT when they are opposed to it
Opponents have also criticised the fact that it is often used on patients who are unable to give their consent.
Figures from 1999, show that almost two out of three patients who had the treatment were unable to give their consent.
These latest guidelines from NICE state that doctors must warn patients of the potential side-effects of ECT and that they must consent to treatment where possible.
Professor Peter Littlejohns, NICE clinical director, said: "There is now clear national guidance on ECT use and on obtaining consent to the procedure."
Andrew Dillon, chief executive of NICE, said the guidelines would help to boost understanding of ECT.
"Today's guidance will help patients and those who treat them, better understand the benefits and risks of ECT and in doing so reduce the uncertainty surrounding the use of what has been a controversial technique."
The mental health charity Mind welcomed the guidance but called for legislation to guarantee a patient's right to refuse treatment.
Its chief executive Richard Brook said: "The administration of ECT has been stuck in the dark ages for too long.
"We are pleased that some measures have been taken to address patients' needs, but we still want to see robust safeguards that will prevent people from being given ECT when they are opposed to it."
Marjorie Wallace, chief executive of the mental health charity Sane, welcomed the guidelines.
"We applaud these guidelines, as we know that ECT is for some people beneficial and saves lives."
Rethink welcomed the decision not to recommend ECT for people with schizophrenia.
Paul Corry, its head of policy and campaigns, said: "NICE has recognised that ECT has no proven benefits in the general treatment of schizophrenia.
"We welcome the fact that people with schizophrenia will not have to undergo what can be a difficult and traumatic experience."
Meanwhile, the Royal College of Psychiatrists has announced plans to introduce a new accreditation scheme for clinics offering ECT.
The scheme, which will be voluntary, aims to ensure high standards in clinics across Britain and Ireland.
NICE has also called for all patients who are diagnosed with diabetes to be offered "structured patient education" to help them to cope better with the condition on a day-to-day basis.