613 Mitzvot
Negative Mitzvah 38
Not to contact the dead

Devarim (Deuteronomy) 18:10-11
Lo-yimatse vecha, ma'avir beno-uvito ba'esh, kosem ksamim, me'onen umenachesh umchashef, vechover chaver, vesho'el ov veyid'oni, vedoresh el-hametim.
There should not be found among you, who makes his son or daughter pass through the fire, or divine divinations, or observes times, or observes signs and omens or practices witchcraft, or use incantations, or inquire of familiar spirits, soothsayer, or those inquiring of the dead.

Drash el-hametim (inquiring of the dead) is prohibited in this mitzvah. We should not communicate with the dead to learn information from them. The method of communication doesn't matter, even if it it isn't done by through a medium or psychic. Ralbag mentioned meditation as one method of contacting the dead. Other methods mentioned by tradition are fasting, or consulting a skull (Talmud Bavli Sanhedrin 65b).

1 Shemu'el 28:11-18
Then said the woman, Whom shall I bring up to you? He said, Bring me up Shemu’el [Samuel]. When the woman saw Shemu’el, she cried with a loud voice; and the woman spoke to Sha’ul, saying, Why have you deceived me? for you are Sha’ul. The king said to her, Don’t be afraid: for what do you see? The woman said to Sha’ul, I see a god coming up out of the earth. He said to her, What form is he of? She said, An old man comes up; and he is covered with a robe. Sha’ul perceived that it was Shemu'el, and he bowed with his face to the ground, and did obeisance. Shemu'el said to Sha'ul, Why have you disquieted me, to bring me up? Sha'ul answered, I am sore distressed; for the Pelishtim make war against me, and Elohim is departed from me, and answers me no more, neither by prophets, nor by dreams: therefore I have called you, that you may make known to me what I shall do. Shemu'el said, Why then do you ask of me, seeing YHVH is departed from you, and is become your adversary? YHVH has done to you, as he spoke by me: and YHVH has torn the kingdom out of your hand, and given it to your neighbor, even to David. Because you didn't obey the voice of YHVH, and didn't execute his fierce wrath on Amalek, therefore has YHVH done this thing to you this day.

Twice this spirit of Shemu'el [Samuel] asked, "Why do you bring me up? Why do you seek me?" King Sha'ul was not hearing from YHVH, because of his disobedience, but he was very desperate to hear something, so he saught a forbidden means to seek information and guidance.

(Yeshayhu 8:19, 20) When they tell you, "Consult with those who have familiar spirits and with the wizards, who chirp and who mutter:" shouldn’t a people consult with their Elohim? Should they consult the dead on behalf of the living? Turn to the law and to the testimony! If they don’t speak according to this word, surely there is no morning for them.

Instead of consulting the dead, we should consult Elohim, as well as what He had already revealed in His Torah.

He said, I ask you therefore, father, that you would send him to my father's house; for I have five brothers, that he may testify to them, so they won't also come into this place of torment. But Avraham said to him, They have Moshe and the prophets. Let them listen to them. He said, No, father Avraham, but if one goes to them from the dead, they will repent. He said to him, If they don't listen to Moshe and the prophets, neither will they be persuaded if one rises from the dead. (Luke 16:27-31)

Again, we see that the Torah and other Scripture is the source of our guidance. His Word is the one we should seek.