Cameron Diaz played a ghost in the 2014 movie "The Other Woman".
In the movie, she plays the ghost of Carly, a previous girlfriend of Mark (played by Nikolaj Coster-Waldau), who died in a car accident. She helps Kate (played by Leslie Mann) discover that Mark is cheating on her.