Great question — answering as the UphillTech team:
I think you're after Francois Ozon's In the House from 2012 with Kristin Scott Thomas and Emmanuelle Seigner: A sixteen-year-old boy insinuates himself into the house of a fellow student from his literature class and writes about it in essays for his French teacher. Faced with this gifted and unusual pupil, the teacher rediscovers his enthusiasm for his work, but the boy's intrusion will unleash a series of uncontrollable events. See if the trailer rings any bells:
Full answer by Walt: https://movies.stackexchange.com/a/30565 (CC BY-SA 3.0).
Need it done for your business? UphillTech.