Parse Error: unexpected ‘}’ while creating Shortcode with Loop [closed]

You have a typo in your code (enwhile instead of endwhile) so PHP is complaining because of non-closed while loop. Correct it and everything should be ok.