You get this message if your wp-config.php
doesn't contain data that allows the site to establish a connection to a database.
You should make a fresh wordpress installation which will create necessary DB tables (you'll have to provide an empty database on your localhost and insert correct info into wp-config.php
). After that download only the theme your friend created and set it as active.
If there are crucial plugin dependencies in the theme you'll also have to download the plugins... And if some data that is necessary for the theme display is located in your friend's database - you'll have to export his entire database and import it at your MAMP.