How to filter WordPress posts using a hook in a plugin?

Solution:

I thought there was a nicer solution, but this is how I finally solved it:

add_filter ( 'query_vars', 'myplugin_filter_posts');

function myplugin_filter_posts( $content )
{
  //WP's query handler
  global $wp_query;

  //The id of the category whose posts I'd like to show
  $catId = 1;

  $result = $wp_query->query( 'cat='.$catId );
  return $content;
}

If you tips for a better solution, please share 🙂