There are two ways of getting the related entity details in many to many relationship in CRM 4.0
One way is to use RetrieveMultipleRequest function from the SDK:
For example, if we have a Loan custom entity and we want to return sets of borrowers (contacts):
Second way is to use Fetch function to return the XML of the related entities:
James Downey created a nice little program FetchXMLBuilder to help you build the fetch query.
Just for completion, below is the CRMServiceWrapper constructor that I use:
Hope this helps ^_^