Hi,
It depends what you mean by "purchased". If you purchase a song together with all rights to it, so that you actually own it (as opposed to simply a license to play it for personal use), then you can do whatever you want with it. If you only purchase a license to play the song, , but not publish it, then your rights would be determined by the terms of the license. Usually there will be no problem in using the song for personal use in a project such as a slideshow.
Songs acquired from iTunes, for example, are just licenses for personal use. You can download them and use them in your project for personal use. However, you couldn't use it in a Hollywood movie, for example, without consent of the owner or exclusive licensee. Publishing the slideshow on social media might also be a problem.
Aside from downloading and placing the song in your project, it depends on what you intend to do with the slideshow that contains the music. Publishing on an internet site like iTunes or Instagram may be prohibited as beyond personal use, or exceeding the terms of the license. You would need to consult the license agreement to determine your rights.
Intellectual property and copyright laws are somewhat of a briar patch. You would need to consult an attorney for a definitive determination of your rights. None of my comments are intended to be legal advice and should not be relied upon as such.
-- Rich