Q. A very busy student deliberately (lo alenu) desecrated Shabbos by writing an essay because he thought he wouldn't be able to do it unless he worked on Shabbos. He wants to do teshuva. Is he obligated to rip up or delete what he wrote, and re-do it, and may he give in to the professor what he wrote on Shabbos?
If he has to rewrite or retype his essay, does he have to create a totally new essay too if the research was done on line also on Shabbos?
A. Shulchan Aruch (O.H. 318: 1) rules that one who desecrates Shabbos by doing intentionally any of the prohibited works, cannot benefit from the transgression done. Therefore, Horav Shlomo Miller's Shlit'a opinion is that indeed the paper has to be rewritten or retyped.
However, the topic, material and ideas prepare for the essay, can be reused, even if they were searched on line during Shabbos. (See Shulchan Aruch 307:17, Mishna Berura and Piskei Teshuvos n. 225, on different opinions in regard to studying for a college exam on Shabbos. See also question 156).
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit'a