/* Create a new request */
$request = new Zend_Controller_Request_Http();
/* The ID of the forum to show. In this example, we'll show the forum with the ID 2*/
$request->setParam('node_id', 2);
/* Create a new response */
$responseForum = new Zend_Controller_Response_Http();
/* New RouteMatch to use when instance the new ControllerPublic */
$routeMatch = new XenForo_RouteMatch();
/* The controller that holds the action that we want to call: XenForo_ControllerPublic_Forum */
$controllerForum = new XenForo_ControllerPublic_Forum($request, $responseForum, $routeMatch);
/* Pre Dispatch the controller with the actionIndex */
$controllerForum->preDispatch('index');
/* Call the actionIndex in the Controller. This action show a list of threads. (that's what we want) */
$controllerResponse = $controllerForum->{'actionIndex'}();