Never query in a loop. That stacks (potentially) hundreds of queries for a single run.
Join it.
PHP Code:
$sQry = "SELECT p.shop_id, p.distributor_id, q.id, q.service, q.start_date, q.end_date
FROM participation p
INNER JOIN qpons q ON q.id = p.qpon_id
WHERE p.shop_id = '{$session->user_id}'";
Loop it and go. You'll need to set up any ordering and use PHP to do some magic if you need to change the visual layout (all the qpons per shop_id, distributor_id, etc).