Listening to Torah in the shower. We learned, Rabotai (my masters), that one is not allowed even to think of a D'var Torah (a Torah teaching) or think about it in learning. Although learning is the best thing, because it is so Kadosh (holy), one is not allowed to talk about Divrei Torah (words of Torah) or think about Divrei Torah in very disgusting and unholy places.
One of those cases is a restroom, a toilet, or a bathroom. A person who is using the restroom, or who is in a room with a bathroom inside it where there is a toilet seat, is not allowed to talk about Divrei Torah and cannot even think about a D'var Torah. Thinking about Torah is also a mitzvah (commandment); it is also a form of learning. It is not literally verbalized as words of Torah, but thinking of Divrei Torah is also a form of learning, something Kadosh, and a mitzvah. One cannot do that in a room contaminated with Tumah, impurity, like a restroom that is also very dirty. It is not respectful to think about a D'var Torah in the restroom.
However, when it comes to a shower room that does not have a restroom inside it, sometimes you have just a shower room, without a bathroom in the room; sometimes you have a room with a toilet seat in a bathroom, with no shower; and sometimes you have both. But let’s say you have a case where it is just a shower room, and there is no toilet seat in the same room where you are taking a shower. Hacham Ovadia Yosef, Maran (our master), says that one is allowed to think about Divrei Torah while taking a shower, especially if it is going to save a person from unnecessary, unhealthy thoughts. Although a D'var Torah is a very holy thing, it is not the best to think about Divrei Torah even while you are in the shower. But according to halacha (Jewish law), it is fine, especially if it is going to save a person from unnecessary thoughts.
So one is allowed to think about a D'var Torah, about the Daf Yomi (daily page) one did, while taking a shower, although one is not dressed. Hacham Ovadia Yosef says even more: let’s say you want to listen to a shiur, a class live; let’s say you want to listen to a recorded class. You are allowed to listen to it while you are in the shower. Now, this is a very big chidush (novel insight), because usually we say that when you listen to somebody saying a Beracha (blessing) for you, it is as if you said it. For example, at Kiddush (sanctification), every Friday night and every Shabbat day, Saturday day, one person at the table makes Kiddush—the mitzvah of Kiddush—for everyone at the table. Even though every single one of us is obligated to say the words of the Kiddush, because we are listening to one person saying it, it is as if we said it with him. It is called shomea, the listener, ke'oneh, it is as if he answered himself.
Hacham Ovadia says that over here, when you listen to a D'var Torah while taking a shower, we do not consider it ke'oneh, as if you are verbalizing a D'var Torah. So therefore, you are allowed to listen to a D'var Torah, because if we considered it as if you were saying it, it would not be allowed to hear it in the shower. But over here, because it is a recorded device, you do not hear the actual person saying it; you'd rather you hear his voice from the device, from the internet, saying it. So it is not really 100% considered as if a person is saying it. Therefore, you are allowed to listen to it even while you are in the shower. So, according to halacha, one is allowed to think of Divrei Torah while taking a shower, and one is even allowed to listen to a speech that is recorded or live from a radio while taking a shower.
However, let’s say—and I know it’s a funny case—there is a person giving a speech outside the shower room, and the guy is very loud and is saying Divrei Torah. That person is taking a shower, obviously with the doors closed. Those Divrei Torah from an actual person live, whose voice you actually hear—not from a recorded device, a computer, a phone, or YouTube, but actually live from the person inside the same building as you, and you can actually hear his voice—are not allowed to be listened to while you are taking a shower.
So if a person is inside using the restroom, even thinking of a D'var Torah is not allowed. When taking a shower, you are allowed to think, and you are even allowed to listen to a D'var Torah from anything that is recorded, not from an actual live person. However, if there is a bathroom inside the room where you are taking a shower, you are not allowed even to think of a D'var Torah. Once there is a restroom inside, in the same place where you are taking a shower, in the same room, it takes the whole room down with it. It makes the whole room even more tameh, even more impure. So therefore, you cannot even think of a D'var Torah while taking a shower.

