I'm DEFINATELY not an expert, but i found that pre-drilling holes, then using 2" wood screws worked REALLY well.
If you countersink them, you can use PlasticWood to fill them, sand it down and it'll be all but unnoticable.
BTW when you're painting MDF, remember to prime it (i didn't, and i regret it) since the side of your board and the top of your boards will look very different if you don't.
If i had to do it again, i'd use some wood glue as well.