Britney Spears is set to guest star on a US TV comedy, it has been reported.A CBS network spokesman said the pop star will appear on a new episode of How I Met Your Mother. Previous guests include Heidi Klum, Enrique Inglesias and Mandy Moore.A second source close to the show said the episode would likely air on March 24, adding that Spears took part in a "table read" rehearsal on Monday - when she was expected to be in court for another hearing.Lawyers at the recent meeting battled it out over money and parenting issues.Court Commissioner Reva Goetz ruled that he could give Britney a personal allowance of $1,500 (£747) a week to spend, using a credit or debit card. He also authorized a $135,000 (£67,217) bank account, controlled by Jamie Spears and a second co-conservator, to pay bills and said conservators could hire an entertainment attorney.Meanwhile, a second court commissioner maintained an October order that gave Kevin Federline custody of their sons, Jayden James, 1, and Sean Preston, 2.In January after Spears' was hospitalised, Court Commissioner Scott Gordon denied her visits to the boys, but in recent weeks Federline has agreed to limited visitation."In terms of the visitation rights, they are status quo," said court spokesman Allan Parachini. "That progression may change but as of now, no changes have been made."© Independent Television News Limited 2008. All rights reserved.