look at the date
keep in mind that an unopened container of ricotta may stay fresh for two to four weeks, and may be good for a week or two past this date. however, if the date has long since come and gone, it's a safe bet that the cheese is no longer good. when in doubt, throw it out.