Download the latest version of Python from python.org
Create a folder on your Pictures folder and call it redditbackground. Add the file RedditBackground.py in that folder.
To run the RedditBackground script, open the command line run this command:
python RedditBackground.py subredditName
For example, to get the top rated image of /r/spaceporn, type:
python RedditBackground.py spaceporn