A burglar who broke into a Dublin city centre Specsavers and stole more than €3,000 worth of glasses frames has been jailed for nine months.