Just paste this into your theme’s function file.
function myLoop($atts, $content = null) {
extract(shortcode_atts(array(
"pagination" => 'true',
"query" => '',
"category" => '',
), $atts));
global $wp_query,$paged,$post;
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
if($pagination == 'true'){
$query .= '&paged='.$paged;
}
if(!empty($category)){
$query .= '&category_name='.$category;
}
if(!empty($query)){
$query .= $query;
}
$wp_query->query($query);
ob_start();
?>
Once your functions.php file is saved, you can display a loop :
[loop category="news" query="" pagination="false"]
Note that this code have been created to been used in pages. It have some oddity when used in a post.
Thanks to John Turner for this great piece of code!