Hi Jan,
You don't need code to connect to SharePoint and pull down a list. Just go to Tools->Data Connections and set up a receive data connection and point it at the list you want. If you want to write code to do this, that's also possible. Matt has writte some samples dealing with SharePoint lists. Please go to the "Search InfoPathDev for:" text field in upper left corner and enter "SharePoint Lists Matt Faus" and let me know if you can't find it. Good luck!
Patrick Halstead
Project Manager at Qdabra