The code you posted is javascript. You would need to change the document.write line to put in any html you want. You can look at these threads:
[HowTo] Display your latest threads on an external page using an RSS2 feed
[HowTo] Display your latest threads on an external page using an XML feed
[HowTo] Display your latest threads on an external page using an RSS feed
There is also an article in the articles forums on how to pull the latest threads via a query.